microsim: Generate microsimulated cohorts

View source: R/microsim.R

microsimR Documentation

Generate microsimulated cohorts

Description

Generates several microsimulated cohorts with desired specifications.

Usage

  microsim(seed=1234, nsim, transition, abs_states, sympt_states, prob_sympt, size, 
           p_men, min_age, max_age, utilityCoefs, costCoefs.md, costCoefs.nmd, 
           costCoefs.i, disc=3, vacc=FALSE, vacc.age=NULL, ndoses=NULL, vacc.cov=NULL, 
           vacc.eff=NULL, vacc.type=NULL, vacc.prop=NULL, vaccprice.md=NULL, 
           vaccprice.nmd=NULL, vaccprice.i=NULL, screening=FALSE, screenType=0, 
           scrSchema=0, screenPeriod=NULL, cytoType=NULL, screenPrice.md=NULL, 
           screenPrice.nmd=NULL, screenPrice.i=NULL, colpoPrice.md=NULL, 
           colpoPrice.nmd=NULL, colpoPrice.i=NULL, hpvTestPrice.md=NULL, 
           hpvTestPrice.nmd=NULL, hpvTestPrice.i=NULL, cytoHpvPrice.md=NULL, 
           cytoHpvPrice.nmd=NULL, cytoHpvPrice.i=NULL, biopsPrice.md=NULL, 
           biopsPrice.nmd=NULL, biopsPrice.i=NULL, screenCoverage=NULL, screenSensi=NULL,
           screenSensi2=NULL, screenSensi3=NULL, colpoSensi=NULL, biopSensi=NULL, 
           hpvTestSensi=NULL, treatProbs, nAnnualVisits=0, nAnnualVisitsLSIL=0, 
           nAnnualVisitsHSIL=0, cytoHPVPeriod=0, cytoHPVPostColpo=0, 
           cytoHPVPostBiop=NULL, cytoLSILperiod=0, cytoHSILperiod=0, switchAge=0, 
           C_period=NULL, hpvPeriod=0, nCores=1)

Arguments

seed

seed to be used in the simulation. Default value is 1234.

nsim

number of cohorts to be simulated.

transition

transition probabilities matrix.

abs_states

vector with the absorbing states.

sympt_states

vector with the health states that might present symptoms.

prob_sympt

vector with the probability of presenting symptoms for each health state that might present symptoms. Should have the same length of sympt_states.

size

number of individuals on each simulated cohort.

p_men

proportion of men in the simulated cohorts.

min_age

lowest age in the cohort.

max_age

largest age in the cohort.

utilityCoefs

vector with the utilities for each health state.

costCoefs.md

vector with the direct medical costs for each health state.

costCoefs.nmd

vector with the direct non medical costs for each health state.

costCoefs.i

vector with the indirect costs for each health state.

disc

discount rate in percentage. Default value is 3.

vacc

boolean value specifying if the considered scenario includes vaccination. Default value is FALSE.

vacc.age

vector with ages at vaccination if the considered scenario includes vaccination. Default value is NULL.

ndoses

number of doses of vaccine if the considered scenario includes vaccination. Default value is NULL.

vacc.cov

vaccine coverage if the considered scenario includes vaccination. Default value is NULL.

vacc.eff

vaccine effectivity if the considered scenario includes vaccination. Default value is NULL.

vacc.type

type of vaccine if the considered scenario includes vaccination, character with values biv for bivalent, quad for quadrivalent and nona for nonavalent vaccines. Default value is NULL.

vacc.prop

proportion of vaccinated women on each age group if the considered scenario includes vaccination. Default value is NULL.

vaccprice.md

vaccine direct medical costs if the considered scenario includes vaccination. Default value is NULL.

vaccprice.nmd

vaccine direct non medical costs if the considered scenario includes vaccination. Default value is NULL.

vaccprice.i

vaccine indirect if the considered scenario includes vaccination. Default value is NULL.

screening

boolean specifying if the considered scenario includes screening of any type. Default value is FALSE.

screenType

type of screening. 1 stands for organized screening, 2 stands for opportunistic screening. Default value is 0 (no screening).

scrSchema

screening schema. 1 stands for cytology alone with repeat cytology for triage, 2 stands for cytology with HPV triage, 3 stands for HPV with cytology triage and 4 stands for HPV genotyping with cytology triage. Default value is 0 (no screening).

screenPeriod

screening period (in years). Default value is NULL (no screening).

cytoType

type of cytology. 0 stands for conventional cytology, 1 stands for Liquid Based Cytology (LBC). Default value is NULL (no cytology).

screenPrice.md

medical direct cost of cytology. Default value is NULL.

screenPrice.nmd

non-medical direct cost of cytology. Default value is NULL.

screenPrice.i

indirect cost of cytology. Default value is NULL.

colpoPrice.md

medical direct cost of colposcopy. Default value is NULL.

colpoPrice.nmd

non-medical direct cost of colposcopy. Default value is NULL.

colpoPrice.i

indirect cost of colposcopy. Default value is NULL.

hpvTestPrice.md

medical direct cost of HPV test. Default value is NULL.

hpvTestPrice.nmd

non-medical direct cost of HPV test. Default value is NULL.

hpvTestPrice.i

indirect cost of HPV test. Default value is NULL.

cytoHpvPrice.md

medical direct cost of HPV reflex test, in case cytoType=1. Default value is NULL.

cytoHpvPrice.nmd

non-medical direct cost of HPV reflex test, in case cytoType=1. Default value is NULL.

cytoHpvPrice.i

indirect cost of HPV reflex test, in case cytoType=1. Default value is NULL.

biopsPrice.md

medical direct cost of biopsy. Default value is NULL.

biopsPrice.nmd

non-medical direct cost of biopsy. Default value is NULL.

biopsPrice.i

indirect cost of biopsy. Default value is NULL.

screenCoverage

cytology coverage for each age group. Default value is NULL.

screenSensi

cytology sensitivity for each age group. Default value is NULL.

screenSensi2

cytology sensitivity after cytology for each age group. Default value is NULL.

screenSensi3

cytology sensitivity after HPV test for each age group. Default value is NULL.

colpoSensi

colposcopy sensitivity for each age group. Default value is NULL.

biopSensi

biopsy sensitivity for each age group. Default value is NULL.

hpvTestSensi

HPV test sensitivity for each age group. Default value is NULL.

treatProbs

probability of recuperation after treatment for each FIGO I - FIGO IV states.

nAnnualVisits

number of annual visits after colposcopy for screening schema 1. Default value is 0.

nAnnualVisitsLSIL

number of annual visits after LSIL for screening schema 2. Default value is 0.

nAnnualVisitsHSIL

number of annual visits after HSIL for screening schema 2. Default value is 0.

cytoHPVPeriod

cytology and HPV test protocol period for screening schemas 3 and 4. Default value is 0.

cytoHPVPostColpo

cytology and HPV test protocol period after colposcopy protocol for screening schemas 3 and 4. Default value is 0.

cytoHPVPostBiop

cytology and HPV test protocol period after biopsy protocol for screening schemas 2. Default value is NULL.

cytoLSILperiod

period for cytology after LSIL detection for screening schame 2. Default value is 0.

cytoHSILperiod

period for cytology after HSIL detection for screening schame 2. Default value is 0.

switchAge

age at which screening protocol changes for screening schemas 3 and 4. Default value is 0.

C_period

vector with screening periods (in years) before and after switch age for screening schemas 3 and 4. Default value is NULL.

hpvPeriod

period for HPV test in screening schema 2. Default value is 0.

nCores

number of cores of the computer. Default value is 1.

Value

Data frame containing the simulated cohorts and the individual history for each person in each simulated cohort.

Author(s)

David Moriña (Universitat de Barcelona), Pedro Puig (Universitat Autònoma de Barcelona) and Mireia Diaz (Institut Català d'Oncologia)

References

Georgalis L, de Sanjosé S, Esnaola M, Bosch F X, Diaz M. Present and future of cervical cancer prevention in Spain: a cost-effectiveness analysis. European Journal of Cancer Prevention 2016;25(5):430-439.

Moriña D, de Sanjosé S, Diaz M. Impact of model calibration on cost-effectiveness analysis of cervical cancer prevention 2017;7.

See Also

mSimCC-package, bCohort, costs, le, plotCIN1Incidence, plotCIN2Incidence, plotCIN3Incidence, plotIncidence, plotMortality, plotPrevalence, qalys, yls

Examples

data(probs)
nsim       <- 3
p.men      <- 0
size       <- 20
min.age    <- 10
max.age    <- 84

#### Natural history
hn <- microsim(seed=1234, nsim, probs, abs_states=c(10, 11), sympt_states=c(5, 6, 7, 8), 
               prob_sympt=c(0.11, 0.23, 0.66, 0.9), 
                size, p.men, min.age, max.age, 
                utilityCoefs = c(1, 1, 0.987, 0.87, 0.87, 0.76, 0.67, 0.67, 0.67, 0.938, 0, 0),
                costCoefs.md = c(0, 0, 254.1, 1495.9, 1495.9, 5546.8, 12426.4, 23123.4, 
                                 34016.6, 0, 0, 0),
                costCoefs.nmd = c(0, 0, 81.4, 194.1, 194.1, 219.1, 219.1, 219.1, 219.1, 0, 0, 0),
                costCoefs.i = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), disc=3, 
                treatProbs=c(0,0,1,1,1,0.9894,0.9422,0.8262,0.5507,0,0,0),
                nCores=1) ### individual level

mSimCC documentation built on Aug. 22, 2023, 5:07 p.m.