Hi. I always thank you all of the R program worker and researchers. I am using R for my thesis, and I have a question.
I am simulating multi-dimensional and categorical items (polytomous) with mirt-simdata. However, I wish each items' categories are normal distribution. I checked a lot of information from the internet. Unfortunately, I couldn't find a good one. It looks like before version, there is a 'simdata_normal' function, but not anymore. Is there another way to simulate the normal distribution of the multi-dimensional item polytomous-responses? Here is my code, I was working on. #two dimensional categorical data simulation Theta <- rmvnorm(10000, sigma = matrix(c(1, .5, .5, 1), 2)) #correlation of .5 summary(Theta) set.seed(12345) #slope matrix of 20 rows=items, a1=10 factor 1, a2=10 factor 2 aa <- matrix(c(rlnorm(20,.2,.3),rep(0,40),rlnorm(20,.2,.3)),40) #rlnorm-log normal distribution dd<-matrix(rnorm((40*4),0,2.0), 40) dd <- t(apply(dd, 1, sort, decreasing=TRUE)) #sort since intercepts are ordered polytomous4 <- simdata(aa, dd, 10000, Theta=Theta, itemtype = 'gpcm') summary(polytomous4) Can anyone please check and help me? I desperately have to figure out this problem as soon as possible. Thank you very much for reading my question. Have a good day. God bless you! Best, Soonhwa(Suna) Paek Educational Psychology-Statistics and Measurements University of Wisconsin-Milwaukee p...@uwm.edu 262-441-3019 Soonhwa(Suna) Paek Educational Psychology-Statistics and Measurements University of Wisconsin-Milwaukee p...@uwm.edu 262-441-3019 ________________________________ From: Suna Paek Sent: Wednesday, July 10, 2019 3:46 PM To: r-wind...@r-project.org Subject: mirt-simdata question. Hi. I always thank you all of the R program worker and researchers. I am using R for my thesis, and I have a question. I am simulating multi-dimensional and categorical items (polytomous) with mirt-simdata. However, I wish each items' categories are normal distribution. I checked a lot of information from the internet. Unfortunately, I couldn't find a good one. It looks like before version, there is a 'simdata_normal' function, but not anymore. Is there another way to simulate the normal distribution of the multi-dimensional item polytomous-responses? Here is my code, I was working on. #two dimensional categorical data simulation Theta <- rmvnorm(10000, sigma = matrix(c(1, .5, .5, 1), 2)) #correlation of .5 summary(Theta) set.seed(12345) #slope matrix of 20 rows=items, a1=10 factor 1, a2=10 factor 2 aa <- matrix(c(rlnorm(20,.2,.3),rep(0,40),rlnorm(20,.2,.3)),40) #rlnorm-log normal distribution dd<-matrix(rnorm((40*4),0,2.0), 40) dd <- t(apply(dd, 1, sort, decreasing=TRUE)) #sort since intercepts are ordered polytomous4 <- simdata(aa, dd, 10000, Theta=Theta, itemtype = 'gpcm') summary(polytomous4) Can anyone please check and help me? I desperately have to figure out this problem as soon as possible. Thank you very much for reading my question. Have a good day. God bless you! Best, Soonhwa(Suna) Paek Educational Psychology-Statistics and Measurements University of Wisconsin-Milwaukee p...@uwm.edu 262-441-3019 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.