You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am planning on using this package for my dissertation. I was wondering if you had any plans (or insights) for how I might account for clustering, stratification, and unequal probability of selection/weighting (as in Lumley's survey package) when using msm. Thank you for making this!
I haven't done much of this, but the package does support subject-specific weights, through the subject.weights argument to msm(). There are no random effects or clustered variance estimators though. It may be possible to get adjusted variances via a "cluster bootstrap" that only resamples clustered data (or some other complex design), calling msm() on each resample, and taking the variance of the estimates over resamples. But I don't have any worked examples of this - you'd have to design the sampler and pool the results by hand.
Activity
chjackson commentedon Oct 23, 2026
I haven't done much of this, but the package does support subject-specific weights, through the
subject.weightsargument tomsm(). There are no random effects or clustered variance estimators though. It may be possible to get adjusted variances via a "cluster bootstrap" that only resamples clustered data (or some other complex design), callingmsm()on each resample, and taking the variance of the estimates over resamples. But I don't have any worked examples of this - you'd have to design the sampler and pool the results by hand.syltuder commentedon Oct 23, 2026
Thank you!!