pred.logit.env {Renvlp}R Documentation

Estimation or prediction for logit.env

Description

Perform estimation or prediction under the envelope model in logistic regression.

Usage

pred.logit.env(m, Xnew)

Arguments

m

A list containing estimators and other statistics inherited from xenv.

Xnew

The value of X with which to estimate or predict Y. A p dimensional vector.

Details

This function evaluates the envelope model at new value Xnew. It can perform estimation: find the fitted value when X = Xnew. The covariance matrix of estimation and the standard errors of estimation are also provided.

Value

The output is a list that contains following components.

value

The fitted value or predicted value evaluated at Xnew.

covMatrix.estm

The covariance matrix of the fitted value at Xnew.

SE.estm

The standard error of the fitted value at Xnew.

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 <- as.numeric(ifelse(horseshoecrab[ , 4] > 0, 1, 0))

m <- logit.env(X, Y, 1)

pred.res <- pred.logit.env(m, X[1, ])
pred.res


[Package Renvlp version 3.4.5 Index]