For rank d and fixed envelope dimension u, fit the reduced-rank envelope model with nonconstant error variance.
rrenv.apweights(X, Y, u, d, asy = TRUE)
The output is a list that contains the following components:
An orthogonal basis of the envelope subspace.
An orthogonal basis of the complement of the envelope subspace.
The estimated intercept.
The envelope estimator of the regression coefficients.
The envelope estimator of the error covariance matrix.
The eta matrix in the coefficient matrix.
The B matrix in the coefficient matrix.
The coordinates of Sigma with respect to Gamma.
The coordinates of Sigma with respect to Gamma0.
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 reduced rank 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.
The rank of the coefficient matrix. An integer between 0 and u.
Flag for computing the asymptotic variance of the reduced rank 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 reduced rank envelope model to the responses and predictors, $$ Y_{i} = \alpha + \Gamma\eta BX_{i}+\varepsilon_{i}, \Sigma=c_{i}(\Gamma\Omega\Gamma'+\Gamma_{0}\Omega_{0}\Gamma'_{0}), i=1, ..., n, $$ using the maximum likelihood estimation. The errors \(\varepsilon_{i}\) follow a normal distribution. It allows that the error covariance matrix to be nonconstant. When 0 < d < u < r, the estimation procedure in Cook et al. (2015) is implemented. When d < u = r, then the model is equivalent to a reduced rank regression model. When d = u, or d = p < r, then B can be taken as the identity matrix and the model reduces to a response envelope model. When the dimension is d = u = r, then the envelope model degenerates to the standard multivariate linear regression. When the u = 0, it means that X and Y are uncorrelated, and the fitting is different.
Cook, R. D., Forzani, L. and Zhang, X. (2015). Envelopes and reduced-rank regression. Biometrika 102, 439-456.
Forzani, L. and Su, Z. (2021). Envelopes for elliptical multivariate linear regression. Statist. Sinica 31, 301-332.
data(vehicles)
X <- vehicles[, 1:11]
Y <- vehicles[, 12:15]
X <- scale(X)
Y <- scale(Y) # The scales of Y are vastly different, so scaling is reasonable here
d <- d.select(X, Y, 0.01)
d
if (FALSE) u <- u.rrenv.apweights(X, Y, 2)
if (FALSE) u
if (FALSE) m <- rrenv.apweights(X, Y, 3, 2)
if (FALSE) m
if (FALSE) m$beta
Run the code above in your browser using DataLab