Skip to contents

See msm::totlos.msm() for the theory behind the method used to calculate this. The analytic formula is used, not numerical integration.

Usage

totlos(draws, t, new_data = NULL, fromt = 0, pstart = NULL, discount = 0)

Arguments

draws

Object returned by msmbayes.

t

End point of the time interval over which to measure length of stay in each state

new_data

Data frame with covariate values to predict for

fromt

Starting point of the time interval, by default 0

pstart

Vector giving distribution of states at time 0

discount

Discount rate in continuous time

Value

Data frame with one row for each state and covariate value, giving the expected amount of time spent in that state over the forecast interval.