Learn R Programming

robcbi (version 1.1-2)

predict.cubinf: Prediction methods for objects of class "cubinf"

Description

Predictions provided by a model fit when method is "cubinf".

Usage

# S3 method for cubinf
predict(object, newdata, type = c("link", "response", "terms"), 
   se.fit = FALSE, terms = labels(object$terms), ...)

Arguments

object

An object of class "cubinf" for which predictions are desired.

newdata

Specify the explanatory variables to used.

type

The prediction type.

se.fit

Logical to specify if standard errors are returned or not.

terms

The terms in newdata.

Additional arguments affecting the predictions produced.

Value

The value returned depends on type.

References

Marazzi, A. (1993). Algorithms, Routines, and S-functions for robust Statistics. Chapman and Hall, New York.

Kuensch, H.R., Stefanski L.A., Carroll R.J. (1989). Conditionally unbiased bounded-influence estimation in general regression models, with application to generalized linear models. Journal of the American Statistical Association, 84, 460-466.

See Also

predict.glm

Examples

Run this code
# NOT RUN {
 library(robcbi)
 data(Finney)
 Vol <- Finney$Vol; Rate <- Finney$Rate; Resp <- Finney$Resp
 df <- data.frame(lVol = log(Vol), lRate = log(Rate), Resp = Resp)
 z.cub <- glm(Resp~lVol+lRate,family=binomial,data=df,method="cubinf",ufact=3.2)
 set.seed(123)
 rVol  <- runif(20,0.4,3.7); rRate <- runif(20,0.3,3.75)
 newdat <- data.frame(lVol=log(rVol),lRate=log(rRate))
 predict(z.cub, newdat, type="response")
# }

Run the code above in your browser using DataLab