Learn R Programming

Cprob (version 1.2.2)

predict.cpf: Conditional Probability Estimates at chosen timepoints

Description

This function displays estimates of the conditional probability function at timepoints chosen by the user

Usage

## S3 method for class 'cpf':
predict(object, timepoints, ...)

Arguments

object
An object of class cpf
timepoints
Vector of timepoints
...
Not used

Value

  • A data.frame with the following columns
  • timeThe given timepoints
  • cpConditional probability estimates
  • varVariance estimates
  • lowerLower confidence limit
  • upperUpper confidence limit
  • n.riskNumber of individuals at risk just before the timepoints
  • groupGroup, if any

See Also

cpf

Examples

Run this code
data(mgus)
mgus$A <- ifelse(mgus$age < 64, 0, 1)

test <- cpf(Hist(time, ev)~A, data = mgus)

predict(test, c(10, 20))

Run the code above in your browser using DataLab