predict.hglm | R Documentation |
Obtains predictions from a fitted holistic generalized linear model object.
## S3 method for class 'hglm'
predict(object, newdata = NULL, type = c("link", "response"), ...)
object |
a fitted object of class inheriting from "hglm". |
newdata |
an optional data frame containing new observations for which predictions are to be made. If ommitted, the fitted linear predictors are used. |
type |
the type of predictions to be made. Possible values are
|
... |
optional arguments currently ignored. |
A vector of predicted values. If type = "link"
, the predicted
values are in the link scale; if type = "response"
, the predicted
values are in the response scale.
dat <- rhglm(100, c(1, 2, -3, 4, 5, -6))
fit <- hglm(y ~ ., constraints = k_max(3), data = dat)
pred <- predict(fit)
pred2 <- predict(fit, newdata=dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.