View source: R/predict.cubinf.R
predict.cubinf | R Documentation |
Predictions provided by a model fit when method is "cubinf".
## S3 method for class 'cubinf'
predict(object, newdata, type = c("link", "response", "terms"),
se.fit = FALSE, terms = labels(object$terms), ...)
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. |
The value returned depends on type.
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.
predict.glm
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.