genv: Fit the groupwise envelope model

View source: R/genv.R

genvR Documentation

Fit the groupwise envelope model

Description

Fit the groupwise envelope model in multivariate linear regression with dimension u. The groupwise envelope model is designed to accommodate both distinct regression coefficients and distinct error structures for different groups.

Usage

genv(X, Y, Z, u, asy = TRUE, fit = TRUE, init = NULL)

Arguments

X

Predictors. An n by p matrix, p is the number of predictors. The predictors can be univariate or multivariate, discrete or continuous.

Y

Multivariate responses. An n by r matrix, r is the number of responses and n is number of observations. The responses must be continuous variables.

Z

A group indicator vector of length n, where n denotes the number of observations.

u

Dimension of the groupwise envelope. An integer between 0 and r.

asy

Flag for computing the asymptotic variance of the envelope estimator. The default is TRUE. When p and r are large, computing the asymptotic variance can take much time and memory. If only the envelope estimators are needed, the flag can be set to asy = FALSE.

fit

Flag for computing the fitted response. The default is TRUE.

init

The user-specified value of Gamma for the groupwise envelope subspace. An r by u matrix. The default is the one generated by function genvMU.

Details

This function fits the groupwise envelope model to the responses and predictors,

Y_{(l)j} = μ_{(l)} + Γη_{(l)j} X_{(l)j}+\varepsilon_{(l)j}, Σ_{(l)}=ΓΩ_{(l)}Γ'+Γ_{0}Ω_{0}Γ'_{0}

for l = 1, ..., L, using the maximum likelihood estimation. When the dimension of the groupwise envelope is between 1 and r-1, the starting value and blockwise coordinate descent algorithm in Cook et al. (2016) is implemented. When the dimension is r, then the envelope model degenerates to the standard multivariate linear regression. When the dimension is 0, it means that X and Y are uncorrelated, and the fitting is different. When L is 1, the groupwise envelope model degenerates to the envelope model in Cook et al. (2010).

Value

The output is a list that contains the following components:

beta

A list of r by p matrices for the estimator of regression coefficients. beta[[i]] indicates the estimator of regression coefficient for the ith group.

Sigma

A list of the estimator of error covariance matrix. Sigma[[i]] contains the estimated covariance matrix for the ith group.

Gamma

An orthonormal basis of the groupwise envelope subspace.

Gamma0

An orthonormal basis of the complement of the groupwise envelope subspace.

eta

The coordinates of beta with respect to Gamma.

Omega

The coordinates of Sigma with respect to Gamma.

Omega0

The coordinates of Sigma with respect to Gamma0.

mu

The estimator of group mean. A r by L matrix whose ith column contains the mean for the group.

loglik

The maximized log likelihood function.

covMatrix

A list of the asymptotic covariance of vec(beta). The covariance matrix returned are asymptotic. For the actual standard errors, multiply by 1 / n. covMatrix[[i]] contains the asymptotic covariance matrix for the ith group.

asySE

A list of the asymptotic standard error for elements in beta under the groupwise envelope model. The standard errors returned are asymptotic, for actual standard errors, multiply by 1 / sqrt(n). asySE[[i]] contains the asymptotic standard error for elements in beta[[i]].

ratio

A list of the asymptotic standard error ratio of the standard multivariate linear regression estimator over the groupwise envelope estimator, for each element in beta. ratio[[i]] contains the asymptotic standard error ratio for the ith group.

groupInd

A matrix containing the unique values of group indicators. The matrix has p rows.

n

The number of observations in the data.

ng

The number of observations in each group.

Yfit

Fitted responses.

References

Park, Y., Su, Z. and Zhu, H. (2017) Groupwise envelope models for Imaging Genetic Analysis. Biometrics, to appear.

Cook, R. D., Li, B. and Chiaromente, F. (2010). Envelope Models for Parsimonious and Efficient Multivariate Linear Regression (with discussion). Statist. Sinica 20, 927- 1010.

Cook, R. D., Forzani, L. and Su, Z. (2016) A Note on Fast Envelope Estimation. Journal of Multivariate Analysis. 150, 42-54.

Examples

data(fiberpaper)
X <- fiberpaper[ , c(5, 7)]
Y <- fiberpaper[ , 1:3]
Z <- as.numeric(fiberpaper[ , 6] > mean(fiberpaper[ , 6]))
## Not run: u <- u.genv(X, Y, Z)
## Not run: u
## Not run: m <- genv(X, Y, Z, 2)


Renvlp documentation built on Aug. 8, 2022, 1:06 a.m.

Related to genv in Renvlp...