Learn R Programming

nlmm (version 1.1.1)

vcov.nlmm: Calculate Variance-Covariance Matrix for a Fitted Generalized Laplace Mixed-Effects Object

Description

Returns the variance-covariance matrix of the all the parameters of a fitted nlmm object.

Usage

# S3 method for nlmm
vcov(object, ...)

Value

a matrix.

Arguments

object

an nlmm object.

...

not used.

Author

Marco Geraci

Details

Gives the variance-covariance matrix of the GLME estimator, on the scale of the unconstrained, unrestricted parameters. The size is \(d x d\), \(d = p + r + 2 + 1 + s\), with \(p\) fixed coefficients, \(r\) non-redundant parameters of the random effects distribution, 2 shape parameters, 1 scale parameter, \(s\) parameters of the residual variance function (if specified in the model), in this order.

See Also

nlmm

Examples

Run this code
if (FALSE) {
data(rats)

# Number of parameters is d = 6 + 3 + 2 + 1 + 0 = 12
fit <- nlmm(y ~ trt*time, random = ~ time, group = id, data = rats,
cov = "pdSymm", control = nlmmControl(multistart = FALSE))
fit$par
vcov(fit)

# Number of parameters is d = 6 + 1 + 2 + 1 + 4 = 14
fit <- nlmm(y ~ trt*time, random = ~ 1, group = id, data = rats,
control = nlmmControl(multistart = FALSE), weights = varIdent(form = ~ 1|time))
fit$par
vcov(fit)

# Number of parameters is d = 6 + 1 + 0 + 1 + 0 = 8
# Note that the shape parameters are now constrained
fit <- nlmm(y ~ trt*time, random = ~ 1, group = id, data = rats,
control = nlmmControl(alpha.index = 0, multistart = FALSE))
fit$par
vcov(fit)

}

Run the code above in your browser using DataLab