sim_state_occupancy: Simulate state occupancy

Description Usage Arguments Value

View source: R/sim_state_occupancy.R

Description

Simulate state occupancy of new patients for a given number of days.

Usage

1
sim_state_occupancy(fit, trans, newdata, nday)

Arguments

fit

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

trans

matrix describing the possible transitions

newdata

dataframe containing the covariates of the new patients (one row per new patient)

nday

number of days to simulate

Value

a matrix containing the number of patients per state (rows) and per day (cols)


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