R/GPvam-package.R

#' Maximum Likelihood Estimation of Multiple Membership Mixed Models
#'
#' An EM algorithm fits multiple-membership linear mixed models used in
#' educational value-added assessment. Teachers are modeled with random
#' effects; dependence among a student's observations is modeled through
#' either the residual covariance or a random student effect.
#' Restricted maximum likelihood (REML) is used by default; set
#' \code{REML = FALSE} in \code{\link{GPvam}} for maximum likelihood (ML).
#'
#' @details
#' Use \code{\link{GPvam}} to fit generalized, reduced generalized, variable,
#' complete, or zero persistence models. \code{\link{summary.GPvam}} summarizes
#' a fitted model and \code{\link{plot.GPvam}} draws diagnostic plots.
#' \code{\link{bias.test.custom}} provides an internal alignment diagnostic
#' with a permutation reference. It omits the residual-weighting contribution
#' to bias from covariance fitting and is not an automatic bias correction.
#' \code{\link{simulate_bias}} estimates latent and residual contributions
#' under a specified conditional generating model by refitting the response,
#' with Monte Carlo uncertainty and explicit fit-failure reporting.
#'
#' The package includes simulated example data in \code{\link{vam_data}} and
#' historical runtime and memory measurements in \code{\link{GPvam.benchmark}}.
#'
#' @references
#' Karl, A. T. (2026). Motivating REML via Prediction-Error Covariances in EM
#' Updates for Linear Mixed Models. arXiv:2602.09247v1.
#' \url{https://arxiv.org/abs/2602.09247}.
#'
#' Karl, A., Yang, Y. and Lohr, S. (2013). Efficient Maximum Likelihood Estimation
#' of Multiple Membership Linear Mixed Models, with an Application to
#' Educational Value-Added Assessments. \emph{Computational Statistics & Data
#' Analysis} \bold{59}, 13--27. \doi{10.1016/j.csda.2012.10.004}.
#'
#' Karl, A., Yang, Y. and Lohr, S. (2014). Computation of Maximum Likelihood
#' Estimates for Multiresponse Generalized Linear Mixed Models with Non-nested,
#' Correlated Random Effects. \emph{Computational Statistics & Data Analysis}
#' \bold{73}, 146--162.
#'
#' Karl, A., Yang, Y. and Lohr, S. (2013). A Correlated Random Effects Model for
#' Nonignorable Missing Data in Value-Added Assessment of Teacher Effects.
#' \emph{Journal of Educational and Behavioral Statistics} \bold{38}, 577--603.
#' \doi{10.3102/1076998613494819}.
#'
#' Karl, A. and Zimmerman, D. (2021). A diagnostic for bias in linear mixed model
#' estimators induced by dependence between the random effects and the
#' corresponding model matrix. \emph{Journal of Statistical Planning and
#' Inference} \bold{211}, 107--118. \doi{10.1016/j.jspi.2020.06.004}.
#'
#' Lockwood, J., McCaffrey, D., Mariano, L. and Setodji, C. (2007). Bayesian
#' Methods for Scalable Multivariate Value-Added Assessment. \emph{Journal of
#' Educational and Behavioral Statistics} \bold{32}, 125--150.
#'
#' Mariano, L., McCaffrey, D. and Lockwood, J. (2010). A Model for Teacher
#' Effects From Longitudinal Data Without Assuming Vertical Scaling.
#' \emph{Journal of Educational and Behavioral Statistics} \bold{35}, 253--279.
#' \doi{10.3102/1076998609346967}.
#'
#' McCaffrey, D. and Lockwood, J. (2011). Missing Data in Value-Added Modeling of
#' Teacher Effects. \emph{Annals of Applied Statistics} \bold{5}, 773--797.
#'
#' @author Andrew Karl \email{akarl@asu.edu}, Yan Yang and Sharon Lohr.
#' @name GPvam-package
#' @useDynLib GPvam, .registration = TRUE
#' @import Matrix Rcpp
#' @importFrom utils write.csv flush.console
#' @importFrom rlang .data
#' @importFrom numDeriv jacobian
#' @importFrom graphics abline arrows par plot points strheight strwidth text title
#' @importFrom grDevices devAskNewPage
#' @importFrom methods as
#' @importFrom stats dnorm formula na.fail qnorm qqline qqnorm var ecdf t.test
#' @importFrom stats coef fitted residuals vcov nobs logLik AIC
#' @importFrom MASS ginv
#' @importFrom ggplot2 ggplot geom_histogram geom_vline labs coord_cartesian theme_minimal aes ggsave
#' @importFrom patchwork wrap_plots plot_annotation
#' @export GPvam print.GPvam plot.GPvam summary.GPvam bias.test.custom
"_PACKAGE"

Try the GPvam package in your browser

Any scripts or data that you put into this service are public.

GPvam documentation built on Oct. 23, 2026, 1:06 a.m.