smn.lmm {skewlmm}R Documentation

ML estimation of scale mixture of normal linear mixed models

Description

It fits a scale mixture of normal linear mixed model with possible within-subject dependence structure, using an EM-type algorithm (via the DAAREM method, by default). It provides estimates and standard errors of parameters.

Usage

smn.lmm(data, formFixed, groupVar, formRandom = ~1, depStruct = "UNC",
        timeVar = NULL, distr = "norm", covRandom = "pdSymm",
        pAR = 1, control = lmmControl())

Arguments

data

A data frame containing the variables named in formFixed, formRandom, groupVar, and timeVar.

formFixed

A two-sided linear formula object describing the fixed effects part of the model, with the response on the left of a ~ operator and the covariates, separated by + operators, on the right.

groupVar

A character containing the name of the variable which represents the subjects or groups in data.

formRandom

A one-sided linear formula object describing the random effects part of the model, with the covariates, separated by + operators, on the right of a ~ operator. By default, a model with random intercept is considered.

depStruct

A character indicating which dependence structure should be used. "UNC" for conditionally uncorrelated ("CI" is also accepted), "ARp" for AR(p) – p is length(phi)–, "CS" for compound symmetry, "DEC" for DEC, and "CAR1" for continuous-time AR(1).

timeVar

A character containing the name of the variable which represents the time in data. Meaningless if depStruct="UNC" or depStruct="CS". For other structures, if is.null(timeVar) the observations are considered equally spaced and ordered. If depStruct="ARp", timeVar must be an index, preferably starting at 1.

distr

A character indicating which distribution should be used. "norm" for normal, "t" for t, "sl" for slash, and "cn" for contaminated normal.

covRandom

A character indicating which structure should be used for the random effects scale matrix (either "pdSymm" (default), for a general positive-definite matrix, or "pdDiag", for a diagonal matrix).

pAR

If depStruct="ARp", pAR indicates the order of the autoregressive process that should be used. Otherwise, it is meaningless.

control

An object resulting from the function lmmControl(), containing additional options for the estimation algorithm.

Details

It fits the model Y_i = X_i \beta + Z_i b_i + \epsilon_i, for i=1,\dots,n, where Y_i is a vector with n_i observed continuous responses, b_i ~ SMN(0, D; H) and \epsilon_i ~ SMN(0, \Sigma_i; H), indexed by the same mixing distribution.

For efficiency, the DAAREM method is used for parameter estimation. In case of numerical errors, please try passing to lmmControl(algorithm = "DAAREM") to the control argument.

For details see Schumacher, Lachos & Matos (2021).

Value

An object of class "SMN" representing the SMN-LMM fit. Generic functions such as print and summary have methods to show the results of the fit. The functions fitted and ranef can be used to extract some of its components.

Specifically, the following components are returned:

theta

Named vector with parameter estimates.

iter

Number of iterations runned.

estimates

A named list containing parameter estimates.

uhat

Estimated weights.

loglik.track

Vector containing the log-likelihood value from each iteration of the estimation procedure.

random.effects

Estimated random effects.

std.error

A vector with standard errors.

loglik

Value of the log-likelihood at last iteration.

elapsedTime

Time elapsed in processing, in seconds.

error

Convergence criterion at last iteration.

call

The smn.lmm call that produced the object.

criteria

A list with AIC and BIC criterion.

data

The data frame used on smn.lmm call.

formula

A list containing the formulas used on smn.lmm call.

depStruct

A character indicating which dependence structure was used.

covRandom

A character indicating which structure was used for the random effects scale matrix.

distr

A character indicating which distribution was used.

N

The number of observations used.

n

The number of individuals/groups used.

groupVar

A character indicating the name of the grouping variable.

control

The control list used in the function's call.

timeVar

A character indicating the name of the time variable, if any.

fitted

A vector of fitted values, if calc.bi=TRUE.

Author(s)

Fernanda L. Schumacher, Larissa A. Matos and Victor H. Lachos

References

Henderson, N. C. and R. Varadhan (2019). Damped anderson acceleration with restarts and monotonicity control for accelerating EM and EM-like algorithms. Journal of Computational and Graphical Statistics 28(4), 834-846.

Lachos, V. H., P. Ghosh, and R. B. Arellano-Valle (2010). Likelihood based inference for skew-normal independent linear mixed models. Statistica Sinica 20, 303-322.

Schumacher, F. L., Lachos, V. H., and Matos, L. A. (2021). Scale mixture of skew-normal linear mixed models with within-subject serial dependence. Statistics in Medicine 40(7), 1790-1810.

See Also

lmmControl, update, predict.SMN, residuals.SMN, plot.SMN, smsn.lmm, smn.clmm

Examples

#simple example
dat1 = as.data.frame(nlme::Orthodont)
fm1 = smn.lmm(dat1, formFixed=distance ~ age, groupVar="Subject",
                control=lmmControl(max.iter=30))
fm1

#fitting for several distributions / dependence structures
fm1 = smn.lmm(dat1, formFixed=distance ~ age+Sex, groupVar="Subject")
fm2 = smn.lmm(dat1, formFixed=distance ~ age+Sex, groupVar="Subject",
              distr="t")
fm3 = smn.lmm(dat1, formFixed=distance ~ age+Sex, groupVar="Subject",
              distr="sl")
fm4 = smn.lmm(dat1, formFixed=distance ~ age+Sex, groupVar="Subject",
              depStruct="ARp", pAR=1)
criteria(list(fm1=fm1, fm2=fm2, fm3=fm3, fm4=fm4))
summary(fm3)

#some diagnostic tools
plot(fm3)
acf3 = acfresid(fm3, calcCI=TRUE, MCiter=100)
plot(acf3)
plot(mahalDist(fm3), nlabels=2)
healy.plot(fm3)


[Package skewlmm version 1.1.0 Index]