Hello all,
In this article, article (Evaluation of a multi-arm multi-stage Bayesian design for phase II drug selection trials β an example in hemato-oncology), they study the Evaluation of a multi-arm multi-stage Bayesian design, for example, let us we want to compare two new treatments {trt=1,2} to a common reference {trt=0}
> event = sample(0:1, size = 1000, replace = T)
> trt = as.factor( sample(c(0,1,2), size = 1000, replace = T) )
> mydata = data.frame(event, trt)
> str(mydata)
'data.frame': 1000 obs. of 2 variables:
$ event: int 1 1 0 0 0 0 0 1 1 1 ...
$ trt : Factor w/ 3 levels "0","1","2": 3 3 1 1 2 3 2 2 2 1 ...
Itβs not clear for me how they did the computations, but with rstanarm package, I run the model as follows:
> library(rstanarm)
> post <- stan_glm(event~trt-1,
+ data = mydata,
+ family = binomial("logit"),
+ prior = normal(location = 0, scale = 10, autoscale = FALSE),
+ prior_intercept = NULL,
+ prior_aux = NULL,
+ QR= FALSE,
+ mean_PPD = FALSE,
+ seed=123456,
+ cores=2,
+ chains = 3,
+ refresh=0)
> simdata = as.data.frame(post)
> head(simdata)
trt0 trt1 trt2
1 -0.2271590 -0.15856774 -0.06239190
2 -0.2255432 0.13231237 0.03647478
3 0.2200402 0.09135786 -0.04482848
4 0.1804914 0.11293285 -0.08651130
5 0.0746649 0.07895283 -0.11162836
6 -0.1859310 -0.13899772 -0.11444129
Then they said, the inefficacy of each drug was assessed by three approaches, as shown in this picture,
which really I do not know how to do this with rsatnarm, could anyone help and thanks in advance.