mglrm: Multigroup Latent Regression Item Response Model

Description Usage Arguments Details Value References Examples

View source: R/mglrm.R

Description

Estimate multigroup latent regression models for binary and ordinal item response data considering partially missing covariate data.

Usage

1
2
mglrm(Y, Ymis = c("ignore", "incorrect"), X = NULL, S = NULL, itermcmc,
  burnin, thin = 1, tdf = 10, cartctrl1 = 5, cartctrl2 = 1e-04)

Arguments

Y

data frame containing item responses. They can be binary or ordinal items. The responses must be coded starting at 0 or as NA. Rows of Y correspond to persons and columns correspond to items.

Ymis

character string how to treat NA in Y. The default method will omit them element-wise (unbalanced panel structure) and incorrect will treat them as incorrect answers.

X

data frame containing person-level covariates. They can be numeric or factor variables and contain missing values coded as NA. Rows of X correspond to persons and columns correspond to covariates. With X set to NULL (default) an interecpt-only model will be estimated.

S

integer vector of individual group membership. A multigroup model with S stratifying the sample will be estimated. The most simple latent regression item response model without grouping results from S set to NULL (default).

itermcmc

number of MCMC iterations.

burnin

number of burnin iterations.

thin

thinning interval, i.e., retain only every thinth iteration (if argument thin is used, itermcmc*thin and burnin*thin yield the total number of MCMC and burnin iterations).

tdf

degrees of freedom of multivariate-t proposal distribution for category cutoff parameters for ordinal items.

cartctrl1

minimum number of observations in any terminal CART node during covariates imputation cycles.

cartctrl2

complexity parameter. Any CART split that does not decrease the overall lack of fit by a factor of control2 is not attempted during covariates imputation cycles.

Details

mglrm uses a fully Bayesian estimation approach. Independent conjugate prior distributions are chosen to develop a Metropolis-within-Gibbs sampling algorithm based on the device of data augmentation (Tanner & Wong, 1987). The function generates a sample from the posterior distribution of a one dimensional two-parameter normal ogive IRT model (Albert, 1992)

y_{ij}^*=α_j θ_i - β_j + \varepsilon_{ij}

including a (multivariate) regression equation of person level predictors on the mean vector of latent abilities

θ_i=x_iγ_{S_i} + e_i.

Regression parameters are allowed to vary across observed groups. Partially observed person-level covariates are imputed in each sampling iteration. Sequential CART (Burgette & Reiter, 2010) are utilized as approximations to the full conditional distributions of missing values in X.

Value

list with elements MCMCdraws and M-Hacc containing a list of posterior samples matrices (rows correspond to iterations and columns to parameters) and, if estimated, a vector of Metropolis-Hastings acceptance rates of category cutoff parameters for ordinal items.

References

Albert, J. H. (1992). Bayesian estimation of normal ogive item response curves using gibbs sampling. Journal of Educational Statistics, 17(3), 251-269.

Burgette, L. F., & Reiter, J. P. (2010). Multiple imputation for missing data via sequential regression trees. American Journal of Epidemiology, 172(9), 1070-1076.

Tanner, M. A., & Wong, W. H. (1987). The calculation of posterior distributions by data augmentation. Journal of the American Statistical Association, 82(398), 528-549.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## prepare data input
data(simdata_2mglrm)
Y <- simdata_2mglrm[, grep("Y", names(simdata_2mglrm), value = TRUE)]
X <- simdata_2mglrm[, grep("X", names(simdata_2mglrm), value = TRUE)]

## estimation setup: MCMC chains of length 20 with 4 initial burn-in samples
## for testing purposes (for your applications itermcmc > 10000 needed)
##
## not considering grouping
results_model1 <- mglrm(Y = Y, X = X, itermcmc = 10, burnin = 2, thin = 2)

## considering grouping
results_model2 <- mglrm(Y = Y, X = X, S = simdata_2mglrm$S, itermcmc = 10, burnin = 2,
  thin = 2)

jcgaasch/LaRA documentation built on July 26, 2019, 1:52 a.m.