Dear all,

I am trying to run a mixed effect model across 10 different clinical trials to obtain inter-trial random error and estimate its variance covariance matrix. Each trial j have n_j observations with its treatment status (whether treated or not treated), their outcome y_i (0 or 1), the model I want to estimate is

y_ij = X_ij*\beta + 1{Treated}*\tau_j + u_ik

where Z_j is indicator variable for the trial an observation belongs to.
1{Treated} is indicator for whether the observation is treated.
\tau_j is the random intercept on 1{Treated} for each clinical trial

And I would like to specify the structure of variance-covariance matrix for tau_j across the j number of clinical trials

So if I did not want the random intercept (i.e. if I did not want to interact tau_j with 1{Treated}), but rather just the random effect of each trial, then I would run something like
mixed vsstrk i.trial i.g || _all:tr1-tr19, cov(pattern(f))

However, I am at a loss how to appropriately fit 1{Treat} into the stata command..checked many documents but couldn't find an answer. Would appreciate any help!

Best,
Andy