# 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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.76032263,"math_prob":0.9846237,"size":3337,"snap":"2022-40-2023-06","text_gpt3_token_len":825,"char_repetition_ratio":0.15211521,"word_repetition_ratio":0.11588785,"special_character_ratio":0.24602936,"punctuation_ratio":0.13931888,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9962492,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-05T06:58:55Z\",\"WARC-Record-ID\":\"<urn:uuid:4015a888-6b7c-42a2-b5f7-94dd3de00e2a>\",\"Content-Length\":\"42240\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d19dfe93-cb08-4ca0-9bc0-5a556322cf89>\",\"WARC-Concurrent-To\":\"<urn:uuid:a33d7464-ebf0-4113-a5c5-97a2aee0cf7b>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/cran/Renvlp/man/weighted.env.html\",\"WARC-Payload-Digest\":\"sha1:ZQMROSUS3KORXHDSJRTXXOUQFOAKZNZC\",\"WARC-Block-Digest\":\"sha1:TD7FBYG2DPFUNKG6XD62UNV2ZD3S26ZF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337537.25_warc_CC-MAIN-20221005042446-20221005072446-00628.warc.gz\"}"}