This folder contains STAN and JAGS files for simulating clinical trials for ordinal endpoints using a Bayesian progression model.
Icon  Name                                 Last modified      Size  Description
[PARENTDIR] Parent Directory - [   ] ExampleCovidTrial.pptx 2020-04-23 13:49 169K [TXT] example_2arm_Fixed_Ordinal_JAGS.R 2020-04-23 13:51 12K [TXT] example_2arm_Fixed_Ordinal_stan.R 2020-04-22 11:37 14K [TXT] example_2arm_Fixed_Ordinal_stanarm.R 2020-04-23 13:34 11K [TXT] run_example_2armFixed.R 2020-04-23 13:53 1.7K

This folder includes R code for power calculations for a two-arm trial with an ordinal endpoint. This particular example is for an 8-point ordinal outcome, but the code will work for any number of ordinal outcome levels. We model the endpoint with a Bayesian cumulative logistic model. Additional details on the trial design are given in the ExampleCovidTrial.pptx slides.

The file “run_example_2armFixed.R” includes an example power calculation based on the simulation code.

There are three files that include trial simulation code.
- We recommend using the file “example_2arm_Fixed_Ordinal_stanarm.R” to begin because it is the fastest. This code uses the stan_polr function in the rstanarm package.
- We also provide a Stan model/code in the “example_2arm_Fixed_Ordinal_stan.R” file.
- Finally, we provide a JAGS model in the “example_2arm_Fixed_Ordinal_JAGS.R” file.

The Stan/JAGS models are the most flexible — they can be modified to include covariates, random effects, alternative priors, etc.