Re: [R] ability estimate with GRM of IRT

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.be>
Date: Fri 19 Jan 2007 - 08:20:34 GMT

you need to use the 'resp.patterns' argument of factor.scores(); look at ?factor.scores for more info, e.g.,

library(ltm)

fit <- grm(Environment)
factor.scores(fit)
factor.scores(fit, resp.patterns = Environment)

I hope it helps.

Best,
Dimitris

ps, it'd be better not to call your fitted GRM model 'grm'; check

library(fortunes)
fortune("dog")



Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium

Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


> Hi my friends,
>
> I have an issue with ability estimates when running GRM of IRT. I
> have responses from 242 subjects but got 183 ability estimates.
> Below is what I did to get the estimates.
>
> 1) I have a csv file "P1.csv" and I imported it into R and loaded
> the "ltm" package by doing:
> p1<-read.table("P1.csv",header=TRUE,sep=",")
> library(ltm)
>
> 2) I created a subset that included columns 2 to 9 for the
> analysis by doing:
> s1<-p1[,2:9]
>
> 3) I converted the subset into data.frame format by doing:
> s1df=data.frame(s1)
>
> 4) I checked the descriptive stats for the s1df by doing:
> ds1df=descript(s1df)
> ds1df
>
> And it was confirmed that 242 subjects' responses were imported.
>
> 5)I ran GRM on the s1df dataset by doing:
> grm<-grm(s1df, Hessian=T)
> grm
>
> 6)Finally, I ran the ability estimated by doing:
> aes1=factor.scores(grm)
> aes1
>
> And I got 183 factor-scores for observed response patterns.
> Besides, the 183 estimates are not for the first 183 subjects of
> the 242 because the response patterns of No 1 on the factor-scores
> list do not match those of No 1 in the s1 dataset and the same
> thing holds true for the rest of the response patterns.
>
> Could you help me find out what the problem is?
>
> Many thanks in advance!
>
> Feng
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri Jan 19 19:25:20 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 19 Jan 2007 - 10:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.