Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected number of visits from a fmsm() model #153

Open
mattwarkentin opened this issue Feb 8, 2023 · 1 comment
Open

Expected number of visits from a fmsm() model #153

mattwarkentin opened this issue Feb 8, 2023 · 1 comment

Comments

@mattwarkentin
Copy link
Contributor

mattwarkentin commented Feb 8, 2023

Hi @chjackson,

Is it possible to estimate the expected number of visits in each state from a flexsurv::fmsm() model? Similar to the envisits.msm() function from the {msm} package.

I guess I have the same question about sojourn times, also. Or more generally whether there are summary metrics that can be obtained from msm models that aren't supported for fmsm models (e.g., efpt, pnext, ppass).

@chjackson
Copy link
Owner

For semi-Markov models, in general, you can get any summary statistic via simulation (sim.fmsm). This is how I'd generally prefer to specify a flexible multistate model - I think it's usually more useful to conceive risk of the next transition as a function of the time since the previous transition, rather than the time since time zero.

For Markov models, I expect all the things you mention are mathematically possible but don't have handy interfaces - so someone could compute them if they understood the appropriate theory. For example, I think the expected number of visits could be calculated by solving a differential equation, in the same manner as the total length of stay.

Though I think the mean sojourn time would be easier under a semi-Markov model - it's just the mean of the appropriate time-to-event distribution, which is available for all distributions in the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants