predict.cpf: Conditional Probability Estimates at chosen timepoints

Description Usage Arguments Value Author(s) See Also Examples

View source: R/predict.cpf.R

Description

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

Usage

1
2
## 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

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

Author(s)

Arthur Allgnol, arthur.allignol@gmail.com

See Also

cpf

Examples

1
2
3
4
5
6
data(mgus)
mgus$A <- ifelse(mgus$age < 64, 0, 1)

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

predict(test, c(10, 20))

Example output

Loading required package: prodlim
  time        cp         var      lower     upper n.risk group
1   10 0.2100000 0.001699302 0.12920521 0.2907948     80     0
2   20 0.4291771 0.002922341 0.32322405 0.5351302     42     0
3   10 0.1538462 0.002076218 0.06453935 0.2431530     56     1
4   20 0.5312500 0.007781980 0.35835074 0.7041493     14     1

Cprob documentation built on May 2, 2019, 9:31 a.m.