Description Usage Arguments Details Value References Examples
Estimate multigroup latent regression models for binary and ordinal item response data considering partially missing covariate data.
1 2 |
Y |
data frame containing item responses. They can be binary or ordinal items. The
responses must be coded starting at |
Ymis |
character string how to treat |
X |
data frame containing person-level covariates. They can be numeric or factor
variables and contain missing values coded as |
S |
integer vector of individual group membership. A multigroup model with |
itermcmc |
number of MCMC iterations. |
burnin |
number of burnin iterations. |
thin |
thinning interval, i.e., retain only every |
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 |
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
.
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.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.