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

View source: R/predict.cubinf.R

predict.cubinfR Documentation

Prediction methods for objects of class "cubinf"

Description

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

Usage

## S3 method for class '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

 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")

robcbi documentation built on Aug. 22, 2023, 1:06 a.m.