predict.cpr_cp {cpr} | R Documentation |
Model Prediction
Description
Model prediction for cpr_cp
and cpr_cn
objects.
Usage
## S3 method for class 'cpr_cp'
predict(object, ...)
Arguments
object |
a |
... |
passed to |
Value
the same as you would get from calling predict
on the object$fit
.
Examples
acp <- cp(log10(pdg) ~ bsplines(age, df = 12, bknots = c(45, 53))
, data = spdg
, keep_fit = TRUE)
acp_pred0 <- predict(acp$fit, se.fit = TRUE)
acp_pred <- predict(acp, se.fit = TRUE)
all.equal(acp_pred0, acp_pred)
[Package cpr version 0.4.0 Index]