Description Usage Arguments Details Author(s) See Also Examples
Make predictions for betaboost models
1 2 3 4 |
object |
a fitted model object of class |
newdata |
optional; A data frame in which to look for variables with which to predict or with which to plot the marginal prediction intervals. |
type |
the type of prediction required. The default is on the scale
of the predictors; the alternative |
which |
a subset of base-learners to take into account when computing
predictions or coefficients. If |
aggregate |
a character specifying how to aggregate predictions
or coefficients of single base-learners. The default
returns the prediction or coefficient for the final number of
boosting iterations. |
... |
additional arguments. Currently, only |
The predict
function can be used for predictions for the
distribution parameters depending on new observations.
Benjamin Hofner <benjamin.hofner@pei.de>
predict.mboost
and predict.mboostLSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## load data
data(QoLdata)
## define test data
test <- QoLdata[1:10,]
train <- QoLdata[11:nrow(QoLdata),]
## fit model on training data
b1 <- betaboost(formula = QoL ~ arm + pain, data = train,
iterations = 500)
## predict on test data
predict(b1, newdata = test, type = "response")
## nuissance parameter phi
nuisance(b1)
## the same, but modelling also phi
b2 <- betaboost(formula = QoL ~ arm + pain, data = train,
iterations = 1000,
phi.formula = QoL ~ arm + pain)
## now also estimates for phi
predict(b2, newdata = test, type = "response")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.