sim_gen: Generate simulation binary data in IRT.

Description Usage Arguments Examples

View source: R/simgen.R

Description

Generate simulation binary data in IRT.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sim_gen(
  theta,
  a = NULL,
  b = NULL,
  c = NULL,
  phi = NULL,
  para = NULL,
  item = "A",
  power = 0,
  D = 1.702
)

Arguments

theta

theta vector

a

slope parameter. Default is NULL

b

location parameter. Default is NULL

c

asymptote parameter. Default is NULL

phi

vector of hyperparameter of phi in GIRT model. Default is NULL

para

data.frame. format is same to output parameter data.frame generated by estip.

item

Character. item code.

power

a power of probability of NA. for example power = 1/5

D

a factor constant.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# single test data: subjects=3,000 and item=30, 2PLM
set.seed(0204)
theta <- rnorm(3000)
a <- rlnorm(30, sdlog = 0.25)
b <- rnorm(30)
#sim_data_2 <- irtfun2::sim_gen(theta=theta, b=b, a=a)

# GIRT estimated parameter
set.seed(0204)
theta <- rnorm(3000)
phi <- rinvchi(3000, max = 2)
a <- rlnorm(30, sdlog = 0.25)
b <- rnorm(30)
#sim_dat_girt <- sim_gen(theta=theta, phi=phi, a=a, b=b)

takuizum/irtfun2 documentation built on May 10, 2020, 8:30 a.m.