Hello
I am having difficulties figuring out how to run a FE and RE models on STATA for my multi-level model. A bit of background, this is a health care research question. I am looking at variation in patient reported quality of life before and after treatment (which in this case is a drug) in different hospitals in order to infer performance. Patients take a drug aiming at relieving their specific clinical problem. If a drug does not seem to work for them, doctors switch patients to another drug. Patients provide information about their quality of life at baseline and then after 6 months for each drug. It happens that some patients end up taking different drugs and so they report quality of life measures related to each drug. So, I have episodes (different drugs) clustered in patients who are clustered in hospitals. My model is quality_of_life_6monthsijt = controlsijt + quality_of_life_0monthsijt + hospital effectit + error termijt. I need to use FE or RE to calculate hospital effect. I once run a model of the effect of marriage on mental health for a panel data in which I had as subscripts it, i being individual_id and t year, so I did in STATA xtset individual_id year, but now I need something like xtset hospital_id individual_id number_of_drugs but this does not work. I don't have time as a variable now, I have quality_of_life_0months and quality_of_life_6months in the model separately. I don't want to use xtmixed, I need to use xtreg, fe or xtreg, re. Can you please help on how to do this in STATA?
Another possibility, generalised linear model. Can you please help on how to do this in STATA?
Thank you very much for all the help. Really appreciate it.
Oliveira
I am having difficulties figuring out how to run a FE and RE models on STATA for my multi-level model. A bit of background, this is a health care research question. I am looking at variation in patient reported quality of life before and after treatment (which in this case is a drug) in different hospitals in order to infer performance. Patients take a drug aiming at relieving their specific clinical problem. If a drug does not seem to work for them, doctors switch patients to another drug. Patients provide information about their quality of life at baseline and then after 6 months for each drug. It happens that some patients end up taking different drugs and so they report quality of life measures related to each drug. So, I have episodes (different drugs) clustered in patients who are clustered in hospitals. My model is quality_of_life_6monthsijt = controlsijt + quality_of_life_0monthsijt + hospital effectit + error termijt. I need to use FE or RE to calculate hospital effect. I once run a model of the effect of marriage on mental health for a panel data in which I had as subscripts it, i being individual_id and t year, so I did in STATA xtset individual_id year, but now I need something like xtset hospital_id individual_id number_of_drugs but this does not work. I don't have time as a variable now, I have quality_of_life_0months and quality_of_life_6months in the model separately. I don't want to use xtmixed, I need to use xtreg, fe or xtreg, re. Can you please help on how to do this in STATA?
Another possibility, generalised linear model. Can you please help on how to do this in STATA?
Thank you very much for all the help. Really appreciate it.
Oliveira
Comment