boot.logit.env: Bootstrap for logit.env

Description Usage Arguments Details Value Examples

View source: R/boot.logit.env.R

Description

Compute bootstrap standard error for the envelope estimator in logistic regression.

Usage

1
boot.logit.env(X, Y, u, B)

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

Response. An n by 1 matrix. The univariate response must be binary.

u

Dimension of the envelope. An integer between 0 and p.

B

Number of bootstrap samples. A positive integer.

Details

This function computes the bootstrap standard errors for the coefficients in the logistic regression envelope by the paired bootstrap.

Value

The output is a p by 1 matrix.

bootse

The standard error for elements in beta computed by bootstrap.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(horseshoecrab)	
X1 <- as.numeric(horseshoecrab[ , 1] == 2)
X2 <- as.numeric(horseshoecrab[ , 1] == 3)
X3 <- as.numeric(horseshoecrab[ , 1] == 4)
X4 <- as.numeric(horseshoecrab[ , 2] == 2)
X5 <- as.numeric(horseshoecrab[ , 2] == 3)
X6 <- horseshoecrab[ , 3]
X7 <- horseshoecrab[ , 5]
X <- cbind(X1, X2, X3, X4, X5, X6, X7)
Y <- as.numeric(ifelse(horseshoecrab[ , 4] > 0, 1, 0))

B <- 100
## Not run: bootse <- boot.logit.env(X, Y, 1, B)
## Not run: bootse

Renvlp documentation built on Sept. 11, 2021, 9:07 a.m.