Description Usage Arguments Details Value Author(s) References See Also Examples

This function computes estimates of the conditional probability function of a competing event and its variance. It also tests equality of conditional probability functions in two samples.

1 |

`formula` |
A formula object that has a |

`data` |
A data frame in which the variables in the formula can be interpreted. |

`subset` |
Expression identifying a subset of the data to be used for conditional probability estimation. |

`na.action` |
A missing-data filter function, applied to the model
frame, after any |

`conf.int` |
Level for pointwise two-sided confidence intervals. Default is 0.95. |

`failcode` |
Failure code of the event of interest. Default is the smallest event type provided in the data. |

The conditional probability function is defined as the probability of having failed due to one competing event (the event of interest), given that no other event has previously occurred (Pepe, 1993).

The `cpf`

function aims at estimating this quantity along with
its variance at each event times. It also computes a test of
equality of conditional probability curves in two samples (and
*only* in two samples).

Of note, if there is more than 2 competing events, the failure types that are not of interest are aggregated into one competing event.

`cpf`

returns an object of class `cpf`

with components

`cp` |
Estimates of the conditional probability function given at all event times |

`var` |
Variance estimates |

`time` |
Event times |

`lower` |
Lower confidence limit for the conditional probability curve |

`upper` |
Upper confidence limit for the conditional probability curve |

`n.risk` |
Number of individuals at risk just before |

`n.event` |
A matrix giving the number of events of interest at
time |

`n.lost` |
Number of censored observations at time |

`size.strata` |
Displays the size of each strata |

`X` |
Gives covariate's name and labels |

`strata` |
Gives the covariate labels that will be used by default for plotting the conditional probability curves, for example. |

`call` |
Call that produced the object |

`z` |
Test statististic |

`p` |
p value of the test |

`failcode` |
Same as in function call |

Arthur Allignol, arthur.allignol@uni-ulm.de

M.S. Pepe and M. Mori, Kaplan-Meier, marginal or conditional probability curves in
summarizing competing risks failure time data? *Statistics in
Medicine*, 12(8):737–751.

A. Allignol, A. Latouche, J. Yan and J.P. Fine (2011). A regression
model for the conditional probability of a competing event:
application to monoclonal gammopathy of unknown significance.
*Journal of the Royal Statistical Society: Series C*,
60(1):135–142.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data(mgus)
CP <- cpf(Hist(time, ev), data = mgus)
CP
## With age dichotomised according to its median
mgus$AGE <- ifelse(mgus$age < 64, 0, 1)
CP <- cpf(Hist(time, ev)~AGE, data = mgus)
CP
summary(CP)
## Conditional probability of the competing event
CP.death <- cpf(Hist(time, ev), data = mgus, failcode = 2)
CP.death
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.