The document linked below contains detailed descriptions and examples of simulating longitudinal ordinal outcomes for a two-treatment comparison. This is useful for simulating clinical trials such as COVID-19 therapeutic trials, and studying the Bayesian and frequentist operating characteristics of various tests applied to such data. Within-patient correlation is modeled by a first-order Markov process whereby the ordinal outcome in the previous time interval becomes a covariate for the current time interval. The proportional odds model is the basis for analysis, and this model is extended to account for non-proportional odds with respect to time, by use of the Peterson and Harrell (1990) partial proportional odds model.
Because Markov state transition models describe tendencies for being in the various levels of the ordinal outcome conditional on the previous state, the report pays much attention to the “unconditioning” or marginalization of the transition model to provide the more traditional state occupancy probabilities, to compute, e.g., the probability that a patient will be on a ventilator on day 10 as a function of treatment. When one of the outcome levels (events) is an absorbing state such as death, the occupancy probability for that state at time \(t\) is the cumulative incidence of that event by time \(t\).
The report covers
Power gains from using longitudinal data have major ramifications for sample size calculations and earlier decision making.
The document provides extensive examples and output for new R Hmisc
package functions:
simMarkovOrd
: simulate ordinal longitudinal data under a first-order Markov process with a proportional odds modelsoprobMarkovOrd
: compute state occupancy probabilities from the Markov model for transition probabilitiesestSeqMarkovOrd
: run sequential Markov ordinal longitudinal clinical trial simulationsintMarkovOrd
: compute simulation parameters providing the best compromise on achieved state occupancy and/or transition probabilities against user-specified constraintsUntil the new version of Hmisc
is on CRAN, the latest Hmisc
package source, as well as binary versions for Linux and Windows, may be found here.
The report demonstrates many R programming techniques including
data.table
package for aggregating and reshaping data tablesplotly
graphics when creating the html version of the reportknitr
code chunks each with its own figure caption, using Hmisc::markupSpecs$html$mdchunk