probAB: Calculate proabilities of event

Description Usage Arguments Value

View source: R/funcs_2.R

Description

Calculate proabilities of event for a set/subset of patients in a time interval, using a given survival function.

Usage

1
probAB(patients = TRUE, data, start, end, last.time, FUN)

Arguments

patients

Subset of indices for which to calculate the probabilities

data

Dataset with the times of inclussion, withdrawals, censoring indicator, time of follow-up, ...

start,

end Start or end of the interval of which to calculate the probabilities.

last.time

Number of days elapsed since the beginning of the trial.

FUN

survival function used for calculating the probabilities. Usually output from survFUN().

Value

A vector with the probabilities with the same length as nrow(data[patients, , drop = FALSE]).


gcastella/predRCT documentation built on May 16, 2019, 10:15 p.m.