nevents: Given a uniform accrual period, specified accrual rate and...

View source: R/nevents.R

neventsR Documentation

Given a uniform accrual period, specified accrual rate and follow-up period, and specified parameters for the exponential failure distribution, computes the expected number of failures

Description

Given a uniform accrual period, specified accrual rate and follow-up period, and specified parameters for the exponential failure distribution, computes the expected number of failures

Usage

nevents(acc.rate, acc.per, add.fu, haz = NULL, med = NULL)

Arguments

acc.rate

The accrual rate in patients per time unit

acc.per

Duration of accrual

add.fu

Duration of follow-up from end of accrual to analysis

haz

Exponential hazard rate for failure times. Not needed if med is specified.

med

Median failure time. Not needed if haz is specified.

Details

The exponential distribution has survivor function S(t) equal to exp(-l*t), where l = haz. haz and med are related through haz=log(2)/med. The calculations assume that n=acc.rate*acc.per patients are entered uniformly over the period [0,acc.per], with follow-up continuing for an addition add.fu time units, so censoring will be uniform on [add.fu,add.fu+acc.per]. The failure probability under the specified failure distribution is then computed, as is the expected number of failures, n*fail.prob.

Caution: consistent time units must be used for all quantities.

Value

A vector of length 3 giving the expected number of failures nevents, the failure probability fail.prob and the total sample size n.

See Also

nevents.cure

Examples

acc.per <- 2.2
add.fu <- 3.2
nevents(240,acc.per,add.fu,med=1.7)


raredd/desmon documentation built on May 7, 2024, 3:46 p.m.