pred_state_occupancy: Predict state occupancy

Description Usage Arguments Value

View source: R/pred_state_occupancy.R

Description

Predict state occupancy for 1.25 multi-state model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pred_state_occupancy(
  fit,
  trans,
  nday,
  nsim,
  pars,
  data,
  start_date = "2020-02-25",
  seed = 666,
  ncpu = 1
)

Arguments

fit

multi-state model (or list of models, one per possible transition) estimated with flexsurv::flexsurvreg

trans

matrix describing the possible transitions

nday

number of days to predict

nsim

number of simulations

pars

table of parameter

data

data imported with import_data()

start_date

date to start simulations

seed

seed of the random number generator for reproducible analyses

ncpu

number of cpus to use for parallel computations

Value

a list of simultations (each element of the list correspond to a different state); the data are also returned as an attribute (data)


jpasquier/mscovid documentation built on March 31, 2021, 4:42 a.m.