Learn R Programming

Cprob (version 1.4.1)

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 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

time

The given timepoints

cp

Conditional probability estimates

var

Variance estimates

lower

Lower confidence limit

upper

Upper confidence limit

n.risk

Number of individuals at risk just before the timepoints

group

Group, if any

See Also

cpf

Examples

Run this code
# NOT RUN {
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