SimulateComplete: Simulate a complete data set

Description Usage Arguments Details Value See Also Examples

View source: R/SingleSim.R

Description

Simulate a complete data set of a recurrent event clinical trial without dropouts using a negative binomial model with given rates and dispersion parameters

Usage

1
2
SimulateComplete(study.time, dejaData = NULL, number.subjects = NULL,
  event.rates = NULL, dispersions)

Arguments

study.time

The study follow up period

dejaData

If not NULL this should contain a DejaData object. If this is used then number.subjects and event.rates arguments are ignored

number.subjects

The number of subjects, if a vector c(a,b) then a subjects on the control arm and b subjects on the active arm. If number.subjects is a single number then both arms have the given number of subjects.

event.rates

The rate parameter(s) for the negative binomial model (if single parameter then it is used for both arms)

dispersions

The dispersion parameter(s) for the negative binomial model (if single parameter then it is used for both arms)

Details

Each subject's events are described by a Poisson process with a subject specific rate given by lambda/study.time where study.time is the study follow up period and lambda has a gamma distribution with shape=1/dispersion and scale=dispersion*event.rate*study.time

Different dispersions, event.rates and number of subjects can be specified for both arms of the trial

Value

A SingleSim object with status='complete'

See Also

SingleSim.object

Examples

1
2
3
4
sim <- SimulateComplete(study.time=365,number.subjects=50,
                        event.rates=c(0.01,0.005),dispersions=0.25)
sim2 <- SimulateComplete(study.time=365,number.subjects=c(50,75),
                        event.rates=c(0.01,0.005),dispersions=c(0,0.25))

scientific-computing-solutions/dejaVu documentation built on May 29, 2019, 3:44 p.m.