callFhcrc: Define and run simulation

View source: R/prostata.R

callFhcrcR Documentation

Define and run simulation

Description

Function to specify and run the microsimulation. A large number of simulated men, n, will cause the simulation to take longer time but will reduce the stochastic variation particularly for rare events.

Usage

callFhcrc(
  n = 10,
  screen = "noScreening",
  nLifeHistories = 10,
  seed = 12345,
  panel = FALSE,
  flatPop = FALSE,
  pop = pop1,
  tables = IHE,
  debug = FALSE,
  parms = NULL,
  mc.cores = 1,
  cl = NULL,
  print.timing = TRUE,
  ...
)

Arguments

n

Integer number of men to simulate. Default: 10

screen

String with one of the following simulated screening scenarios:

noScreening

no screening test, only diagnosis from symptoms

randomScreen50to70

TBA

twoYearlyScreen50to70

two-yearly screening from age 50 to 70

fourYearlyScreen50to70

four-yearly screening from age 50 to 70

screen50

one screen at age 50

screen60

one screen at age 60

screen70

one screen at age 70

screenUptake

current testing pattern in Sweden

stockholm3_goteborg

TBA

stockholm3_risk_stratified

TBA

goteborg

risk stratified re-screening 2+4 from age 50 to 70

risk_stratified

risk stratified re-screening 4+8 from age 50 to 70

mixed_screening

risk stratified re-screening 2+4 from age 50 to 70 & opportunistic testing for other ages

regular_screen

TBA

single_screen

TBA

introduced_screening_only

TBA

introduced_screening_preference

TBA

introduced_screening

TBA

stopped_screening

TBA

. Default: 'noScreening'

nLifeHistories

Integer with number of men for all events should be recorded, Default: 10

seed

Integer random number seed, Default: 12345

panel

Boolean to use the Stockholm3 biomarker panel test characteristics, otherwise PSA is used, Default: FALSE

flatPop

Boolean to set all birth cohorts of equal size, Default: FALSE

pop

Data.frame with two integer columns cohort with year of the birth cohorts and pop with the size of the corresponding birth cohorts, Default: pop1

tables

List of data.frames to update the tables in fhcrcData, Default: IHE (NB: fhcrcData$ptrx gets changed below to stockholmTreatment if parameters$stockholmTreatment = TRUE – which is the default! This implies that IHE is the default when parameters$stockholmTreatment = FALSE)

debug

Boolean to print debugging, Default: FALSE

parms

List to update FhcrcParameters, Default: NULL

mc.cores

Integer with the number of cores to use for the computation, Default: 1

cl

a cluster object, created by the parallel package or by the snow package. If NULL, use mclapply (i.e. does not use the registered default cluster).

print.timing

Boolean should the required time be printed after the simulation run, Default: TRUE

...

TBA

Details

TBA

Value

A fhcrc object

See Also

mclapply

Examples

## Not run: 
if(interactive()){
 library(prostata)
 sim1 <- callFhcrc(n=1e6, screen="screenUptake", mc.cores=3)
 }

## End(Not run)

mclements/prostata documentation built on Feb. 1, 2023, 1:20 p.m.