Fit the envelope model in the predictor space with dimension u under linear regression.
xenv(X, Y, u, asy = TRUE, init = NULL)
Predictors. An n by p matrix, p is the number of predictors and n is number of observations. The predictors must be continuous variables.
Responses. An n by r matrix, r is the number of responses. The response can be univariate or multivariate and must be continuous variable.
Dimension of the envelope. An integer between 0 and p.
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
.
The user-specified value of Gamma for the envelope subspace in the predictor space. An p by u matrix. The default is the one generated by function envMU.
The output is a list that contains the following components:
The envelope estimator of the regression coefficients.
The envelope estimator of the covariance matrix of X.
An orthonormal basis of the envelope subspace.
An orthonormal basis of the complement of the envelope subspace.
The estimated eta. According to the envelope parameterization, beta = Gamma * Omega^-1 * eta.
The coordinates of SigmaX with respect to Gamma.
The coordinates of SigmaX with respect to Gamma0.
The estimated intercept.
The estimated conditional covariance matrix of Y given X.
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 over the envelope estimator, for each element in beta.
The number of observations in the data.
This function fits the envelope model in the predictor space, $$ Y = \mu + \eta'\Omega^{-1}\Gamma' X +\varepsilon, \Sigma_{X}=\Gamma\Omega\Gamma'+\Gamma_{0}\Omega_{0}\Gamma'_{0} $$ using the maximum likelihood estimation. When the dimension of the envelope is between 1 and p-1, the starting value and blockwise coordinate descent algorithm in Cook et al. (2016) is implemented. When the dimension is p, 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.
Cook, R. D., Helland, I. S. and Su, Z. (2013). Envelopes and Partial Least Squares Re- gression. Journal of the Royal Statistical Society: Series B 75, 851 - 877.
Cook, R. D., Forzani, L. and Su, Z. (2016) A Note on Fast Envelope Estimation. Journal of Multivariate Analysis. 150, 42-54.
simpls.fit
for partial least squares (PLS).
# NOT RUN {
## Fit the envelope in the predictor space
data(wheatprotein)
X <- wheatprotein[, 1:6]
Y <- wheatprotein[, 7]
u <- u.xenv(X, Y)
u
m <- xenv(X, Y, 4)
m
m$beta
## Fit the partial least squares
# }
# NOT RUN {
m1 <- pls::simpls.fit(X, Y, 4)
# }
# NOT RUN {
m1$coefficients
# }
Run the code above in your browser using DataLab