[R] mirt-simdata question.
Abby Spurdle
@purd|e@@ @end|ng |rom gm@||@com
Fri Jul 12 00:57:01 CEST 2019
I don't understand your question.
> I am simulating multi-dimensional and categorical items
What do you mean by "and"?
Reading this sentence alone, I would assume you want one simulated dataset
that's categorical and multivariate.
Which is easy to do...
Because (in general) you can simulate multivariate categorical data the
same way as univariate categorical data...
> However, I wish each items' categories are normal distribution.
But here's the problem.
Now you say you want "each" to have a normal distribution.
So, not categorical, but normal.
Also, "each" implies that you have multiple univariate distributions rather
than one multivariate distribution.
Which are not quite the same thing...
> simulate the normal distribution of the multi-dimensional item
polytomous-responses?
Complete contradiction.
(Sorry).
> 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
ulti-dimensional item polytomous-responses?
I'm assuming that you're using the mvtnorm package (you didn't say).
This will not produce categorical data.
It will produce data approximating a bivariate normal distribution.
My bivariate package vignette contains examples of both bivariate
categorical and bivariate normal distributions.
https://cran.r-project.org/web/packages/bivariate/vignettes/bivariate.pdf
The bivariate normal distributions make use of the mvtnorm package, so
based on the same principles as your code examples.
Hope that helps.
[[alternative HTML version deleted]]
More information about the R-help
mailing list