Learn R Programming

MMeM (version 0.1.1)

MMeM_henderson3: Multivariate Henderson3 method

Description

Multivariate Henderson3 method

Usage

MMeM_henderson3(fml, data, factor_X)

Arguments

fml

two-sided linear formula object describing both the fixed-effects and random-effects parts of the model, with the response on the left of a ~ operator. For univariate response, put variable name directly; for multivariate responses combine variables using concatenate operator, for example, for bivariate responses, c(var1, var2). The predictor terms are separated by + operators, on the right. Random-effects terms are distinguished by vertical bars '|' separating expressions for design matrices from grouping factors.

data

data frame containing the variables named in formula.

factor_X

(logical) indicating whether predictor is a factor or continuous. By default is TRUE

Value

The function returns a list with the following objects:

  • T.estimates is the estimated variance covariance components (T.estimates) of the variance covariance matrix of the block random effects with corresponding sampling variances (T.variance)

  • E.estimates is the estimated variance covariance components (E.estimates) of the variance covariance matrix of the residuals with corresponding sampling variances (E.variance)

References

Wesolowska Janczarek, M. T. "Estimation of covariance matrices in unbalanced random and mixed multivariate models." Biometrical journal 26.6 (1984): 665,674.

Examples

Run this code
# NOT RUN {
data(simdata)
results_henderson <- MMeM_henderson3(fml = c(V1,V2) ~ X_vec + (1|Z_vec),
data = simdata, factor_X = TRUE)

# }

Run the code above in your browser using DataLab