[R] eRm package - Rasch simulation

2012-01-26 Thread James Holland
When I try to create a Rasch simulation of data using the sim.rasch
function, I get more items than I intend

#My code

library(eRm)

#Number of items
k - 20

#Number of participants
n - 100


#Create Rasch Data
#sim.rasch(persons, items, seed = NULL, cutpoint = randomized)

r.simulation - sim.rasch(n,k)

I end up with 20 participants and 100 items, but the instructions say
otherwise (and I believe I have the most up to date).  I reverse the n and
k

sim.rasch(k,n); it works out to how I intended; 100 participants and 20
items.


Can someone explain to me what I'm missing?  I've read the package
instructions and didn't see myself missing something (inputting vectors
instead of an integer).

James

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] eRm package - Rasch simulation

2012-01-26 Thread Achim Zeileis

On Thu, 26 Jan 2012, James Holland wrote:


When I try to create a Rasch simulation of data using the sim.rasch
function, I get more items than I intend

#My code

library(eRm)

#Number of items
k - 20

#Number of participants
n - 100


#Create Rasch Data
#sim.rasch(persons, items, seed = NULL, cutpoint = randomized)

r.simulation - sim.rasch(n,k)

I end up with 20 participants and 100 items, but the instructions say
otherwise (and I believe I have the most up to date).  I reverse the n and
k


If I use your code above, I get

R dim(r.simulation)
[1] 100  20

which is exactly as expected: 100 rows = persons and 20 columns = items.

This is with the current CRAN version of eRm: 0.14-0.
Z


sim.rasch(k,n); it works out to how I intended; 100 participants and 20
items.


Can someone explain to me what I'm missing?  I've read the package
instructions and didn't see myself missing something (inputting vectors
instead of an integer).

James

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.



__
R-help@r-project.org 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.