sim2pldat: Random Dichotomous 2PL Item Data Generator

Description Usage Arguments Value Examples

View source: R/sim2pldat.R

Description

Random Dichotomous 2PL Item Data Generator

Usage

1
2
3
4
5
6
7
8
sim2pldat(
  nitem,
  ilocation = NULL,
  islope = NULL,
  plocation = NULL,
  nobs = 0,
  rnum = 0.5
)

Arguments

nitem

The number of items

ilocation

A data matrix of item difficulty parameter specified by user. Default is to generate nitem difficulty parameters from a standard normal distribution with a mean of 0 and sd of 1

islope

A data matrix of item slope parameter specified by user. Default is to generate nitem slope parameters from a standard normal distribution with a mean of 0 and sd of 1

plocation

A data matrix of person location parameter specified by user when nobs=0.

nobs

The number of observations or rows in the person location matrix which will be generated from a standard normal distribution with a mean of 0 and sd of 1

rnum

The random number between 0 and 1 to assign the responses. For example, when rnum=0.5, if a person's probability of responding items correctly is less than rnum, 1s will be assigned to the items. If larger than rnum, 0s will be assigned.

Value

A list

Examples

1
2
3
4
5
sim2pldat(10,ilocation=NULL,islope=NULL,plocation=rnorm(500,0,1),rnum=0.6)
## Not run: 
sim2pldat(20,nobs=50,rnum=0.6)

## End(Not run)

alanbio/genIRT documentation built on Aug. 4, 2020, 7:51 p.m.