boot.pois.env: Bootstrap for pois.env

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

boot.pois.envR Documentation

Bootstrap for pois.env

Description

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

Usage

boot.pois.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 counts.

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 poisson 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

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 <- horseshoecrab[ , 4]

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

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

Related to boot.pois.env in Renvlp...