predict.cpr_cp: Model Prediction

View source: R/predict.R

predict.cpr_cpR 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 cpr_cp or cpr_cn object

...

passed to predict

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)


dewittpe/cpr documentation built on Feb. 16, 2024, 1:11 p.m.