weighted.xenv: Weighted predictor envelope estimator

View source: R/weighted.xenv.R

weighted.xenvR Documentation

Weighted predictor envelope estimator

Description

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

Usage

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

Arguments

X

Predictors. An n by p matrix, p is the number of predictors and n is number of observations. The predictors must be continuous variables.

Y

Responses. An n by r matrix, r is the number of responses. The response can be univariate or multivariate and must be continuous variable.

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 predictor 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 predictor envelope estimator in a standard multivariate linear regression. And the weighted predictor envelope estimator takes the form

\hat{\beta}_{w}=\sum_{j=1}^{p}w_{j}\hat{\beta}_{j},

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

w_{j}=\frac{\exp(-b_{j})}{\sum_{k=1}^{p}\exp(-b_{k})},

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

The variation of the weighted predictor 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 predictor envelope estimator of the regression coefficients.

mu

The weighted estimated intercept.

SigmaX

The weighted predictor envelope estimator of the covariance matrix of X.

SigmaYcX

The weighted predictor envelope estimator of the error covariance matrix.

w

Weights computed based on BIC.

loglik

The log likelihood function computed with weighted predictor 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 predictor 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[, 1:6]
Y <- wheatprotein[, 7]
m <- weighted.xenv(X, Y)
m$w
m$beta

## Not run: m2 <- weighted.xenv(X, Y, bstrpNum = 100, min.u = 2, max.u = 4, boot.resi = "full")
## Not run: m2$w
## Not run: m2$bootse

Renvlp documentation built on Oct. 11, 2023, 1:06 a.m.

Related to weighted.xenv in Renvlp...