# weighted.env: Weighted response envelope estimator In Renvlp: Computing Envelope Estimators

 weighted.env R Documentation

## Weighted response envelope estimator

### Description

Compute the weighted response envelope estimator with weights computed from BIC.

### Usage

weighted.env(X, Y, bstrpNum = 0, min.u = 1,
max.u = ncol(as.matrix(Y)), boot.resi = "full")


### 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. bstrpNum Number of bootstrap samples. A positive integer. min.u Lower bound of the range of u to compute bootstrap error. A postive integer between 1 and p. This argument is relevant only when bstrpNum>0. max.u Upper bound of the range of u to compute bootstrap error. A postive integer between 1 and p. This argument is relevant only when bstrpNum>0. boot.resi A string that can be "full" or "weighted" indicating the model from which the residuals are calculated. If the input is "full", then the residuals are obtained using the standard estimators; and if the input is "weighted", then the residuals are obtained using the weighted envelope estimators. This argument is for computing residuals in residual bootstrap, and it is relevant only when bstrpNum>0.

### Details

This function computes the weighted envelope estimator in a standard multivariate linear regression. And the weighted envelope estimator takes the form

\hat{β}_{w}=∑_{j=1}^{r}w_{j}\hat{β}_{j},

where \hat{β}_{j} is the envelope estimator of β with u=j and w_{j}'s are the weights computed from BIC values

w_{j}=\frac{\exp(-b_{j})}{∑_{k=1}^{r}\exp(-b_{k})},

where b_{j} is the BIC criterion evaluated at the envelope estimator \hat{β}_{j}. For details, see Eck and Cook (2017).

The variation of the weighted envelope estimator is estimated by residual bootstrap. The user can specify the range for bootstrap u=(min.u, max.u), if the weights outside of the range are small.

### Value

The output is a list that contains the following components:

 beta The weighted envelope estimator of the regression coefficients. mu The weighted estimated intercept. Sigma The weighted envelope estimator of the error covariance matrix. w Weights computed based on BIC. loglik The log likelihood function computed with weighted envelope estimator. n The number of observations in the data. bootse The standard error for elements in beta computed by residual bootstrap. This output is available only when bstrpNum>0. ratios The boostrap standard error ratio of the standard multivariate linear regression estimator over the weighted envelope estimator for each element in beta. This output is available only when bstrpNum>0. bic_select A table that lists how many times BIC selected each candidate dimension. If BIC never selects a dimension, this dimension does not appear on the table. This output is available only when bstrpNum>0.

### References

Eck, D. J. and Cook, R. D. (2017). Weighted Envelope Estimation to Handle Variability in Model Selection. Biometrika. To appear.

### Examples

data(wheatprotein)
X <- wheatprotein[, 8]
Y <- wheatprotein[, 1:6]
m <- weighted.env(X, Y)
m$w m$beta

## Not run: m2 <- weighted.env(X, Y, bstrpNum = 100, min.u = 1, max.u = 6, boot.resi = "full")
## Not run: m2$bic_select ## Not run: m2$bootse


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