Learn R Programming

aster (version 1.3-5)

vcov.aster: Calculate Asymptotic Variance-Covariance Matrix for a Fitted Model Object

Description

vcov() is a generic function and functions with names beginning in vcov. will be methods for this function.

Usage

# S3 method for aster
vcov(object, info = c("expected", "observed"), ...)
# S3 method for reaster
vcov(object, standard.deviation = TRUE, re.too = FALSE,
  complete = TRUE, ...)

Value

A matrix of the estimated approximate, large sample, covariances between the parameter estimates.

Entries for parameters estimated to be zero are zero, not because there is no sampling variability but rather because the sampling distribution is highly non-normal and one-sided so covariances are useless.

This returned matrix has dimension attributes, like any R matrix. For the function vcov.reaster, it also has attributes, which are some of is.alpha, is.b,

is.nu, is.c, and is.sigma. These are all logical vectors that can serve as index vectors for the matrix.

  • is.alpha extracts elements of the variance-covariance matrix for estimates of fixed effects.

  • is.nu extracts elements of the variance-covariance matrix for estimates of variance components (if standard.deviation == FALSE was specified).

  • is.b extracts elements of the variance-covariance matrix for estimates of random effects (if standard.deviation == FALSE & re.too = TRUE was specified).

  • is.nu extracts elements of the variance-covariance matrix for estimates of square roots of variance components (if standard.deviation == TRUE was specified).

  • is.c extracts elements of the variance-covariance matrix for standardized estimates of random effects (if standard.deviation == TRUE & re.too = TRUE was specified).

See reaster for more about these parameterizations.

Arguments

object

an object of class "aster" or class "reaster", usually the object returned by a call to R function aster or R function reaster.

info

the type of Fisher information used to compute the variance-covariance matrix.

standard.deviation

if FALSE, then some of the parameters are variance components, if TRUE, then the square roots of these variance components.

re.too

if TRUE, treat the estimated random effects vector, the mode of the conditional distribution of random effects given observed data, as part of the estimates vector described by the returned variance-covariance matrix. If also standard.deviation is TRUE, then these estimates are standardized.

complete

If TRUE, the full variance-covariance matrix, including entries for parameters estimated to be zero (for which the entries will also be zero).

...

required by the generic function. Ignored by these methods.

See Also

aster, reaster, vcov

Examples

Run this code
data(radish2)

pred <- c(0,1,2)
fam <- c(1,3,2)

rout <- reaster(resp ~ varb + fit : (Site * Region),
    list(block = ~ 0 + fit : Block, pop = ~ 0 + fit : Pop),
    pred, fam, varb, id, root, data = radish2)

vout <- vcov(rout, standard.deviation = FALSE, re.too = TRUE)
attributes(vout)
is.alpha <- attr(vout, "is.alpha")
vout[is.alpha, is.alpha]

Run the code above in your browser using DataLab