For a description of the model, see the "Details" section below.
fastml(y, subj, pred, xcol, zcol, vmax, occ, start,
maxits=50, eps=0.0001)The model, which is typically applied to longitudinal or clustered responses, is
yi = Xi%*%beta + Zi%*%bi + ei , i=1,...,m,
where
yi = (ni x 1) response vector for subject or cluster i; Xi = (ni x p) matrix of covariates; Zi = (ni x q) matrix of covariates; beta = (p x 1) vector of coefficients common to the population (fixed effects); bi = (q x 1) vector of coefficients specific to subject or cluster i (random effects); and ei = (ni x 1) vector of residual errors.
The vector bi is assumed to be normally distributed with mean zero and unstructured covariance matrix psi,
bi $\sim$ N(0,psi) independently for i=1,...,m.
The residual vector ei is assumed to be
ei $\sim$ N(0,sigma2*Vi)
where Vi is a known (ni x ni) matrix. In most applications, Vi is the identity matrix.
ecmeml, ecmerml,
fastrml, fastmode,
mgibbs, fastmcmc,
exampleFor a detailed example, see the file "example.R" distributed
with this library.Run the code above in your browser using DataLab