irt2preg: Fitting Two Parameter Logistic Regression Model

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

View source: R/models.r

Description

Estimate the two parameter logistic model incorporating regression variables for the abiity parameter, approximating the marginal log-likelihood using Laplace approximation.

Usage

1
  irt2preg(items, f_reg, z_reg, init = NULL)

Arguments

items

Numeric matrix (or data.frame) containing only zeroes and ones (J columns).

f_reg

A one sided regression formula indicating the explanatory variables for the ability parameter.

z_reg

A data frame containing explanatory variables indicated in f_reg.

init

Optional numeric vector of initial values at which initialize numerical optimization.

Details

Optimizes raschreglikLA numericaly via nlminb. Rows containing at least one NA, whether in items or x_reg, are removed from both. Standard errors of model parameters are approximated by inverting the observed information matrix.

Value

An object of class rasch is a list containing the following componentes:

call

The matched call

coef

A named vector of coefficients

iter

Number of iterations used to optimize de log-likelihood

loglik

The log-likelihood value

vcov

The variance-covariance matrix of the estimated parameters

items

The item matrix

beta

(Only when regression terms are included) the estimated regression parameters

linpred

(Only when regression terms are included) prediction covariates

Author(s)

Fernando Massa, fmassa@iesta.edu.uy

References

\insertRef

rasch1960raschreg

\insertRef

baker2004raschreg

\insertRef

deboeck2004raschreg

See Also

rasch, raschd, raschreg, raschdreg, irt2p

Examples

1
2
3
4
5
6
  dif  <- c(-3, -2, -1, 0, 1, 2, 3) 
	n    <- 200
	x1x2 <- cbind(x1 = rnorm(n), x2 = ifelse(runif(n) < 0.5, 0, 1))
	beta <- c(1.2, 0.7)
	X    <- sim_rasch(n = n, delta = dif, reg = x1x2, beta = beta)
  mod  <- irt2preg(X, ~ x1 + x2, x1x2)

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