simulate-methods: The simulate methods for EventPrediction package

Description Usage Arguments Details Value

Description

These methods are for the predict from data part of the package and simulate. All functions described here are wrappers for the missing,missing,EventData,FromDataSimParams-method

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S4 method for signature 'ANY,missing,missing'
simulate(object, data, SimParams, ...)

## S4 method for signature 'EventModel,missing,missing'
simulate(object, data, SimParams, ...)

## S4 method for signature 'EventModel,EventData,missing'
simulate(object, data, SimParams, ...)

## S4 method for signature 'EventModel,missing,FromDataSimParam'
simulate(object, data,
  SimParams, ...)

## S4 method for signature 'missing,EventData,FromDataSimParam'
simulate(data, SimParams,
  accrualGenerator = NULL, Naccrual = 0, Nsim = 10000, seed = NULL,
  limit = 0.05, longlagsettings = NULL, HR = NULL, r = NULL,
  dropout = NULL)

Arguments

object

An EventModel object which contains both the data (slot event.data) and the simulation parameters (slot simParams). If not stats::simulate will be called

data

If used then this EventData object will be used when performing the simulations instead of the EventData object within fit

SimParams

A FromDataSimParam object, overrides the simulated parameters from the EventModel object

...

Additional arguments to be passed to the method

accrualGenerator

An AccrualGenerator object used for recruiting additional subjects

Naccrual

The number of additional subjects to be recruited

Nsim

Number of simulations to run

seed

Integer for random number generator (for reproducability) By default NULL.

limit

Limit for the percentiles, default is 0.05 which corresponds to [0.05, 0.95]

longlagsettings

A LongLagSettings object to control the behaviour of the algorithm for subjects whos last date is a long time from the analysis date. Using this argument can have a large impact on the results - see vignette for further details

HR

The hazard ratio: an advanced option which allows two arm trials to be simulated. This replicates the Predict from parameters functionality but uses the recruitment times found in data. See the vignette for further details

r

The allocation ratio: see HR argument.

dropout

if subjects drop out in study (due to competing risks not as there is a finite follow up time) then this argument should contain a list with proportion and time and optionally shape i.e. dropout=list(proportion=0.03,time=365,shape=1.2) meaning in the absence of events 3 will have dropped out after 365 days with a Weibull hazard rate with shape=1.2. If shape is not included then it defaults to 1 (exponential rate). If dropout is NULL then no subjects will drop out

Details

See the stats::simulate method for details of the stats simulate function

Value

A FromDataResults object


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