For fixed envelope dimension u, fit the envelope model in multivariate linear regression with nonconstant error variance.
env.apweights(X, Y, u, asy = TRUE)
The output is a list that contains the following components:
The envelope estimator of the regression coefficients.
The envelope estimator of the error covariance matrix.
An orthogonal basis of the envelope subspace.
An orthogonal basis of the complement of the envelope subspace.
The coordinates of beta with respect to Gamma.
The coordinates of Sigma with respect to Gamma.
The coordinates of Sigma with respect to Gamma0.
The estimated intercept.
The maximized log likelihood function.
The asymptotic covariance of vec(beta). The covariance matrix returned are asymptotic. For the actual standard errors, multiply by 1 / n.
The asymptotic standard error for elements in beta under the envelope model. The standard errors returned are asymptotic, for actual standard errors, multiply by 1 / sqrt(n).
The asymptotic standard error ratio of the standard multivariate linear regression estimator (with consideration of nonconstant variance) over the envelope estimator, for each element in beta.
The number of observations in the data.
The estimated weights \(c_i\).
Predictors. An n by p matrix, p is the number of predictors. The predictors can be univariate or multivariate, discrete or continuous.
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.
Dimension of the envelope. An integer between 0 and r.
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
.
This function fits the envelope model to the responses and predictors, $$ Y_{i} = \mu + \Gamma\eta X_{i}+\varepsilon_{i}, \Sigma=c_{i}(\Gamma\Omega\Gamma'+\Gamma_{0}\Omega_{0}\Gamma'_{0}), i=1, ..., n, $$ using the maximum likelihood estimation. It allows that the error covariance matrix to be nonconstant. When the dimension of the envelope is between 1 and r-1, the alternating algorithm in Forzani and Su (2021) 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.
Forzani, L. and Su, Z. (2021). Envelopes for elliptical multivariate linear regression. Statist. Sinica 31, 301-332.
data(concrete)
X <- concrete[, 1:7]
Y <- concrete[, 8:10]
if (FALSE) u <- u.env.apweights(X, Y)
if (FALSE) u
m <- env.apweights(X, Y, 2)
m
m$beta
Run the code above in your browser using DataLab