Skip to contents

sim_markov("actt2") generates synthetic daily health states from a first-order Markov proportional-odds model based on data from the Adaptive COVID-19 Treatment Trial 2 (ACTT-2), which compared Baricitinib plus Remdesivir with placebo plus Remdesivir in adults hospitalized with COVID-19 (Kalil et al., 2021). States follow the trial's NIAID eight-point ordinal scale:

  1. outside hospital, with usual activities unrestricted

  2. outside hospital, with restricted activities, oxygen at home, or both

  3. in hospital, without oxygen and no further medical care needed

  4. in hospital, without oxygen but still needing medical care

  5. in hospital, needing supplemental oxygen

  6. in hospital, needing high-flow oxygen or noninvasive ventilation

  7. in hospital, needing invasive ventilation or extracorporeal membrane oxygenation (ECMO)

  8. dead

The output has 28 rows per patient by default, and dead patients stay in state 8.

Details

Patients. Each patient's state on the day before follow-up (yprev) is drawn from states 4 to 7 with probabilities 0.1374637, 0.5459826, 0.2090997, and 0.1074540. Treatment is assigned independently with probability treatment_prob: tx = 1 stands for Baricitinib plus Remdesivir and tx = 0 for placebo plus Remdesivir.

Transition model. Write \(Y_t\) for the state on day \(t\) and \(j\) for the state on the previous day. The log odds of being in state \(k\) or worse on day \(t\) is $$\mathrm{logit}\,\Pr(Y_t \ge k \mid Y_{t-1} = j) = \alpha_k + \gamma_j + f(t) + \beta(t)\,\mathrm{tx}$$ for the cutoffs \(k = 2, \ldots, 8\). Here \(\beta(t)\) is the treatment effect on day \(t\) described under treatment_effect_decay in sim_markov(). Every term shifts all cutoffs equally, which makes this a proportional-odds model. The thresholds are

Cutoff \(k\)2345678
\(\alpha_k\)-0.6465-4.9314-5.2230-7.4169-11.5321-15.2262-22.0693

and the previous-state effects are

Previous state \(j\)1234567
\(\gamma_j\)006.22187.14129.980914.164519.3517

The large previous-state effects mean that patients usually stay in, or move close to, their previous state. The day enters through a restricted cubic spline, \(f(t) = -0.3084\,t + 2.5186\,t' - 5.0276\,t'' + 3.1714\,t''' - 1.0672\,t''''\), where \(t'\) to \(t''''\) are the nonlinear basis columns that rms::rcs() creates with knots at days 2, 6, 11, 16, 21, and 27. Days beyond 28, for example with follow_up_time = 60, extrapolate this spline.

In ACTT-2, state 2 was mostly recorded only at the day 14, 21, and 28 visits, so the transition model was fitted with states 1 and 2 merged. The added lowest threshold, \(\alpha_2\), splits them again, placing the observed 9.3% of the control arm in state 2 on day 14. Both states share the same coefficients, so the split does not change the occupancy of states 3 to 8.

Treatment effect. The default treatment_effect of -0.0730 is the coefficient fitted to the ACTT-2 data.

Changing the model. sim_markov() expects the thresholds from the worst state down, so intercepts = rev(alpha) with alpha the \(\alpha_k\) above in the order of the table reproduces the preset. Change an element of alpha before reversing it to move one threshold.

References

Kalil AC, Patterson TF, Mehta AK, et al. (2021). "Baricitinib plus Remdesivir for Hospitalized Adults with Covid-19." New England Journal of Medicine, 384(9), 795-807. doi:10.1056/NEJMoa2031994

See also

sim_markov() to simulate, and actt1_preset for the same model in a sicker population.

Examples

actt2 <- sim_markov("actt2", n_patients = 20, seed = 123)
head(actt2)
#>   id time y yprev tx
#> 1  1    1 5     5  1
#> 2  1    2 5     5  1
#> 3  1    3 5     5  1
#> 4  1    4 5     5  1
#> 5  1    5 5     5  1
#> 6  1    6 4     5  1

# The same model with a higher threshold for death
alpha <- c(-0.6465, -4.9314, -5.2230, -7.4169, -11.5321, -15.2262, -21.5)
sicker <- sim_markov(
  "actt2",
  n_patients = 20,
  intercepts = rev(alpha),
  seed = 123
)