sim_rasch: Simulation of different Rasch models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/sim_rasch.R

Description

Simulates Rasch models including (or not) discrimination parameters and a regression component.

Usage

1
sim_rasch(n, delta, alpha, gamma, reg, beta, ability)

Arguments

n

Number of observations.

delta

Numeric vector of difficulty parameters.

alpha

Numeric vector of (strictly positive) discrimination parameters.

gamma

Numeric vector of pseudo-guessing parameters. Each value should belong to the [0,1) interval.

reg

Numeric matrix of p explanatory variables of ability.

beta

Numeric vector of regression coefficients (Length p).

ability

logical; if TRUE, simulated abilities are given along the items.

Details

If difficulty parameters are not specified, they assume values in the interval from -2 to 2. If discrimination parameters are not specified they assume the default value of 1. If pseudo-guessing parameters are not specified they assume the default value of 0.

Value

sim_rasch returns an object of class "matrix" containing the simulated items and an extra column with the abilities (if ability = TRUE). The dimension of the result is determined by n and J + 1.

Author(s)

Fernando Massa, fmassa@iesta.edu.uy

See Also

rasch

Examples

1
2
sim <- sim_rasch(100)
mod <- rasch(sim)

nando11235813/raschreg documentation built on Oct. 2, 2021, 3:11 p.m.