sim_to_traj: Generate trajectories from flexsurv::sim.fmsm

Description Usage Arguments Value

View source: R/sim_to_traj.R

Description

Generate trajectories from the simulations generated by flexsurv::sim.fmsm for a semi-Markov model built with flexsurv::flexsurvreg. The function flexsurv::sim.fmsm returns the times of the transitions. This function determines each time given in the vector tvec.

Usage

1
sim_to_traj(sim, tvec)

Arguments

sim

output of flexsurv::sim.fmsm

tvec

a vector of times for which the states have to be determined

Value

a matrix of states, each row coresponds to an individual and each column to a time


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