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
Determining cutoff point after -lsens-Dear all, The accuraccy rate of my prediction model is very high that can be explained by imbalanced…
Problem with simple regressionHello Everyone, I am sharing an excel file with you. I ran a regression on it but the results are no…
Erase the multiple imputation settingI am trying to use the HP-Filter by running the following code (as suggested by my thesis advisor): …
Creating an eligibility criteria through a counting variableI've been trying to create a "counting variable" that determines which observations meet the criteri…
Mirrored hbar stataDear all, I am looking for a solution to recreate a hbar graph as the one that I attached. So far I…
Subscribe to:
Post Comments (Atom)
0 Response to random intercept in mixed effect model
Post a Comment