Skip to contents

Fits a unidimensional latent regression \(\theta_{ig}=Y_{ig} \bm{\beta} + \varepsilon_{ig}\) with group-specific variances \(Var(\varepsilon _{ig} )=\sigma^2_g\) based on the individual likelihood of a fitted model.

Usage

immer_latent_regression(like, theta=NULL, Y=NULL, group=NULL, weights=NULL,
   conv=1e-05, maxit=200, verbose=TRUE)

# S3 method for immer_latent_regression
summary(object, digits=3, file=NULL, ...)

# S3 method for immer_latent_regression
coef(object, ...)

# S3 method for immer_latent_regression
vcov(object, ...)

# S3 method for immer_latent_regression
logLik(object, ...)

# S3 method for immer_latent_regression
anova(object, ...)

Arguments

like

Matrix containing the individual likelihood \(L( \bm{X} | \theta )\)

theta

Grid of \(\bm{\theta}\) values

Y

Predictor matrix

group

Group identifiers

weights

Optional vector of weights

conv

Convergence criterion

maxit

Maximum number of iterations

verbose

Logical indicating whether progress should be displayed

object

Object of class immer_latent_regression

digits

Number of digits after decimal to print

file

Name of a file in which the output should be sunk

...

Further arguments to be passed.

Value

List containing values (selection)

coef

Parameter vector

vcov

Covariance matrix for estimated parameters

beta

Regression coefficients

gamma

Standard deviations

beta_stat

Data frame with \(\bm{\beta}\) parameters

gamma_stat

Data frame with standard deviations

ic

Information criteria

deviance

Deviance

N

Number of persons

G

Number of groups

group

Group identifier

iter

Number of iterations

References

Adams, R. J., & Wu, M. L. (2007). The mixed-coefficients multinomial logit model. A generalized form of the Rasch model. In M. von Davier & C. H. Carstensen (Eds.): Multivariate and mixture distribution Rasch models: Extensions and applications (pp. 55-76). New York: Springer.

Note

The IRT.likelihood method can be used for extracting the individual likelihood.

See also

See TAM::tam.latreg for latent regression estimation in the TAM package.

Examples

if (FALSE) {
#############################################################################
# EXAMPLE 1: Latent regression for Rasch model with simulated data
#############################################################################

library(sirt)

#-- simulate data
set.seed(9877)
I <- 15  # number of items
N <- 700 # number of persons per group
G <- 3   # number of groups
b <- seq(-2,2,len=I)
group <- rep( 1:G, each=N)
mu <- seq(0,1, length=G)
sigma <- seq(1, 1.5, length=G)
dat <- sirt::sim.raschtype( stats::rnorm( N*G, mean=mu[group], sd=sigma[group] ), b)

#-- estimate Rasch model with JML
mod1 <- immer::immer_jml( dat )
summary(mod1)

#-- compute individual likelihood
like1 <- IRT.likelihood(mod1)

#-- estimate latent regression
mod2 <- immer::immer_latent_regression( like=like1, group=group)
summary(mod2)
}