--- a +++ b/man/simulate-methods.Rd @@ -0,0 +1,76 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/simulate.R +\docType{methods} +\name{simulate} +\alias{simulate} +\alias{simulate,ANY,missing,missing-method} +\alias{simulate,EventModel,EventData,missing-method} +\alias{simulate,EventModel,missing,FromDataSimParam-method} +\alias{simulate,EventModel,missing,missing-method} +\alias{simulate,missing,EventData,FromDataSimParam-method} +\title{The simulate methods for EventPrediction package} +\usage{ +\S4method{simulate}{ANY,missing,missing}(object, data, SimParams, ...) + +\S4method{simulate}{EventModel,missing,missing}(object, data, SimParams, ...) + +\S4method{simulate}{EventModel,EventData,missing}(object, data, SimParams, ...) + +\S4method{simulate}{EventModel,missing,FromDataSimParam}(object, data, + SimParams, ...) + +\S4method{simulate}{missing,EventData,FromDataSimParam}(data, SimParams, + accrualGenerator = NULL, Naccrual = 0, Nsim = 10000, seed = NULL, + limit = 0.05, longlagsettings = NULL, HR = NULL, r = NULL, + dropout = NULL) +} +\arguments{ +\item{object}{An \code{EventModel} object which contains both the data (slot event.data) and +the simulation parameters (slot simParams). If not stats::simulate will be called} + +\item{data}{If used then this \code{EventData} object will be used when performing the simulations +instead of the \code{EventData} object within \code{fit}} + +\item{SimParams}{A \code{FromDataSimParam} object, +overrides the simulated parameters from the \code{EventModel} object} + +\item{...}{Additional arguments to be passed to the method} + +\item{accrualGenerator}{An AccrualGenerator object used for recruiting additional subjects} + +\item{Naccrual}{The number of additional subjects to be recruited} + +\item{Nsim}{Number of simulations to run} + +\item{seed}{Integer for random number generator (for reproducability) By default NULL.} + +\item{limit}{Limit for the percentiles, default is 0.05 which corresponds +to [0.05, 0.95]} + +\item{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} + +\item{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 \code{data}. See the vignette for +further details} + +\item{r}{The allocation ratio: see \code{HR} argument.} + +\item{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. +\code{dropout=list(proportion=0.03,time=365,shape=1.2)} meaning in the absence of events 3% of subjects +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} +} +\value{ +A \code{FromDataResults} object +} +\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 +} +\details{ +See the stats::simulate method for details of the stats simulate function +} +