Dear all,
I would like to thank you in advance,
I am a new user of Stata and I have some trouble analysing a database characterized by multiple time-points for each variable. The dataset is composed of these variables (in columns): "patient_ID" (the panel variable), "visit_number" (the time variable), "patient_treated"(y/n), "outcome_variable".
When "visit_number"=0 (baseline), "patient_treated" is always =n.
In addition, the decision to treat patients is not randomized but based on a medical decision (e.g., patients with a lower outcome variable at "visit_number"=0 have higher probability to start the drug).
My purpose is to analyse wheter the explanatory variable "patient_treated" is or is not significantly associated to the changes of the outcome variable during time ("visit number").
I used a mixed effects linear regression as follow:

xtset patient_ID visit_number

xtreg outcome_variable i.patient_treated

Is this correct or in my case, it's better to use a fixed effects model?