predict.gfcm: Predict function for flexible mixture cure model

predict.gfcmR Documentation

Predict function for flexible mixture cure model

Description

Function for doing predictions for class gfcm.

Usage

## S3 method for class 'gfcm'
predict(object, newdata = NULL,
        type = c("surv", "curerate", "probcure", "survuncured",
        "hazarduncured", "cumhazuncured", "densityuncured",
        "failuncured", "oddsuncured", "loghazarduncured","hazard",
        "density", "fail", "loghazard", "odds", "cumhaz"), indi = TRUE,
        time = NULL, var.type = c("ci", "se", "n"), pars = NULL,
        link = NULL, keep.attributes = FALSE, ...)

Arguments

object

Object of class gfcm to do predictions from.

newdata

Data frame from which to compute predictions. If empty, predictions are made on the data which the model was fitted on.

type

Prediction type (see details). The default is surv.

indi

Logical. If TRUE, each line in newdata is treated as an individual observations. This functionality allows predictions for each observation at more than one time point.

time

Optional time points at which to compute predictions. This argument is not used if type is curerate.

var.type

Character. Possible values are "ci" (default) for confidence intervals, "se" for standard errors, and "n" for neither.

pars

Numerical vector containing the parameters values of the model. In general, this argument can be ignored by the user.

link

Character, indicating the link function for the variance calculations. Possible values are "log", "cloglog" for log(-log(x)) , "mlog" for -log(x), and "I" for the indentity. If NULL (default), the function will determine link from type.

keep.attributes

Logical. If TRUE, newdata will be added to the attributes of the output.

...

Additional arguments. Currently not used.

Details

Possible values for argument type are:
surv: Survival function
curerate: The cure fraction
probcure: The conditional probability of being cured
survuncured: The survival of the uncured
hazarduncured: The hazard function of the uncured
cumhazuncured: The cumulative hazard of the uncured
densityuncured: The density function of the uncured
failuncured: The distribution function of the uncured, i.e., 1 - survuncured
oddsuncured: Odds of the uncured, i.e., (1 - survuncured) / survuncured
loghazarduncured: The log-hazard of the uncured
hazard: The hazard function
density: The density function
fail: The distribution function
loghazard: The log-hazard function
odds: The odds, i.e., (1 - surv) / surv
cumhaz: The cumulative hazard function

Value

A list containing the predictions of each individual in newdata.


cuRe documentation built on May 17, 2022, 1:05 a.m.

Related to predict.gfcm in cuRe...