weighted.penv: Weighted partial envelope estimator

View source: R/weighted.penv.R

weighted.penvR Documentation

Weighted partial envelope estimator

Description

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

Usage

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

Arguments

X1

Predictors of main interest. An n by p1 matrix, n is the number of observations, and p1 is the number of main predictors. The predictors can be univariate or multivariate, discrete or continuous.

X2

Covariates, or predictors not of main interest. An n by p2 matrix, p2 is the number of covariates.

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

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

where \hat{β}_{j} is the partial 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 partial envelope estimator \hat{β}_{j}. For details, see Eck and Cook (2017).

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

mu

The weighted estimated intercept.

Sigma

The weighted partial envelope estimator of the error covariance matrix.

w

Weights computed based on BIC.

loglik

The log likelihood function computed with weighted partial envelope estimator.

n

The number of observations in the data.

bootse

The standard error for elements in beta1 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 partial envelope estimator for each element in beta1. 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(fiberpaper)
X1 <- fiberpaper[, 7]
X2 <- fiberpaper[, 5:6]
Y <- fiberpaper[, 1:4]
m <- weighted.penv(X1, X2, Y)
m$w
m$beta1

m2 <- penv(X1, X2, Y, 2)
m2$beta1


## Not run: m3 <- weighted.penv(X1, X2, Y, bstrpNum = 100, boot.resi = "full")
## Not run: m3$w
## Not run: m3$bic_select
## Not run: m3$bootse

## Not run: boot.penv(X1, X2, Y, 2, 100)


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

Related to weighted.penv in Renvlp...