Learn R Programming

⚠️There's a newer version (1.4.1) of this package.Take me there.

Conditional probability function of a competing event: The Cprob package

The Cprob package permits to estimate the conditional probability function of a competing event, and to fit, using the temporal process regression or the pseudo-value approach, a proportional-odds model to the conditional probability function (or other models by specifying another link function).

Installation

You can download the stable version on CRAN

install.packages("Cprob")

Or you can install the development version from github

## if necessary
## install.packages("devtools")
devtools::install_github("aallignol/Cprob")

Usage

The conditional probability function can be estimated using the cpf function.

library(Cprob)

mgus$AGE <- ifelse(mgus$age < 64, 0, 1)
CP <- cpf(Hist(time, ev)~AGE, data = mgus)
CP
summary(CP)

A regression model can be fitted either using temporal process regression

fit.cpfpo <- cpfpo(Hist(time, ev)~ age + creat,
                   data = mgus, tis=seq(10, 30, 0.3),
                   w=rep(1,67))

## and plot the odds-ratios
if(require("lattice")) {
xyplot(fit.cpfpo, scales = list(relation = "free"), layout = c(3, 1))
}

or the pseudo-values approach

data(mgus)

cutoffs <- quantile(mgus$time, probs = seq(0, 1, 0.05))[-1]

## with fancy variance estimation
fit1 <- pseudocpf(Hist(time, ev) ~ age + creat, mgus, id = id,
                  timepoints = cutoffs, corstr = "independence",
                  scale.value = TRUE)
summary(fit1)

## with jackknife variance estimation
fit2 <- pseudocpf(Hist(time, ev) ~ age + creat, mgus, id = id,
                  timepoints = cutoffs, corstr = "independence",
                  scale.value = TRUE, jack = TRUE)
summary(fit2)
}

Copy Link

Version

Install

install.packages('Cprob')

Monthly Downloads

75

Version

1.4

License

GPL (>= 2)

Maintainer

Arthur Allignol

Last Published

September 25th, 2017

Functions in Cprob (1.4)

mgus

Monoclonal Gammopathy of Undetermined Significance
predict.cpf

Conditional Probability Estimates at chosen timepoints
print.cpfpo

Print Method for cpfpo objects
print.cpf

Print a cpf object
pseudocpf

Pseudo values for the conditional probability function
lines.cpf

Lines method for 'cpf' objects
Cprob-package

Conditional probability function of a competing event
cpfpo

Proportional-odds Model for the Conditional Probability Function
plot.cpf

Plot method for cpf objects
cpf

Conditional Probability Function of a Competing Event
summary.cpf

Summary method for cpf
xyplot.cpfpo

'xyplot' method for object of class 'cpfpo'
summary.pseudocpf

Summary method for pseudocpf objects