Hello experts,
I have a dataset with the following variable: id, treatment, clinic, smoker(0/1), age(1=21-25, 2=25-35, 3=36-50, 4=51+). Patients were randomly assigned to treatment/placebo in certain clinics and given an assessment (outcome-continuous). Is there a way to run a regression model with clinic fixed-effect? Moved from r to stata so still trying to figure stata out. Some sample code below.
I have a dataset with the following variable: id, treatment, clinic, smoker(0/1), age(1=21-25, 2=25-35, 3=36-50, 4=51+). Patients were randomly assigned to treatment/placebo in certain clinics and given an assessment (outcome-continuous). Is there a way to run a regression model with clinic fixed-effect? Moved from r to stata so still trying to figure stata out. Some sample code below.
Code:
input int(id treatment clinic age assessment) 1 1 1 3 3 2 0 1 2 2.7 3 1 2 1 6 4 0 2 1 4 5 1 2 3 4.5 6 0 2 2 6 7 1 3 2 2.1 8 0 3 2 3 9 1 4 1 5 10 0 4 2 4.3 11 1 4 1 4
Comment