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
Related Posts with random intercept in mixed effect model
Is it possible to use the Stata-python integration module inside of foreach Stata loop?Hello, I am trying to execute the code below and it is giving me an error, mainly because the Stata…
stata command unrecognized r(199) errorHello, I am trying to run the Stata code below, and everything runs except at the very end I am gett…
Wrong coefficient in a fixed effects panel regressionHello, I'm trying to regress the impact that fiscal rules might have on the Primary Balance of a Co…
Using variable measured at different levels in a regressionDear statalist, I am studying the effect of banking competition at the local level on the relations…
how to deal with endogenous control variables when implementing ivreg2hDear STATALIST, I am using Stata/MP 14.0, and I am referring to a SSC function "ivreg2h". I am run…
Subscribe to:
Post Comments (Atom)
0 Response to random intercept in mixed effect model
Post a Comment