Model description
The multiarm model extends the one-stage binomial model to studies with three or more arms. Within-study random effects for each arm are jointly modelled with a correlated normal distribution, accounting for the shared control arm and between-arm correlations within studies.
Mathematical specification
Likelihood:
Within-study random effects:
Priors:
Stan code
data {
int<lower=1> N;
int<lower=1> S;
int<lower=1> T;
array[N] int<lower=0> events;
array[N] int<lower=1> n;
array[N] int<lower=1> study;
array[N] int<lower=0> treatment;
}
parameters {
vector[S] gamma;
vector[T] theta;
vector<lower=0>[T] tau;
matrix[S, T] z;
cholesky_factor_corr[T] L_Omega;
}
transformed parameters {
matrix[S, T] epsilon = (diag_pre_multiply(tau, L_Omega) * z')';
}
model {
target += normal_lpdf(gamma | 0, 10);
target += normal_lpdf(theta | 0, 2.5);
target += student_t_lpdf(tau | 3, 0, 2.5);
target += std_normal_lpdf(to_vector(z));
target += lkj_corr_cholesky_lpdf(L_Omega | 1);
{
vector[N] eta;
for (i in 1:N) {
eta[i] = gamma[study[i]];
if (treatment[i] > 0) {
eta[i] += theta[treatment[i]] + epsilon[study[i], treatment[i]];
}
}
target += binomial_logit_lpmf(events | n, eta);
}
}
generated quantities {
vector[T] b_treat = theta;
corr_matrix[T] Omega = multiply_lower_tri_self_transpose(L_Omega);
}How bayesma calls this model
Selected when multiarm = TRUE and stage = "one_stage". The rho_prior argument sets the LKJ concentration:
Parameterisation notes
The Cholesky factorisation L_Omega of the correlation matrix is used instead of the full correlation matrix for efficiency. multiply_lower_tri_self_transpose(L_Omega) recovers in the generated quantities block for reporting.
The treatment[i] = 0 case (control arm) contributes only the study baseline to the linear predictor.
Identifiability
The correlation matrix is identified by between-study variation across multiarm studies. With few multiarm studies (), is poorly estimated. In this case, fix (identity, implying independent arms) by removing the LKJ prior and setting L_Omega = identity_matrix(T).
Known sampling difficulties
The Cholesky parameterisation and NCP for the random effects matrix greatly improve sampling. Divergences are most common when is large () and multiarm studies are few. Increase adapt_delta to 0.99 if needed.
