Hi,
I have a panel dataset with two times (0 and 1). It is unbalanced with students surveyed at time 0 not surveyed at time 1 and students surveyed at time 1 but who were not surveyed at time 0.
I just wanted to check if the time 0 sample and time 1 sample have similar characteristics. I therefore use a variable Y0 collected at time 0 and check whether Y0 is different at time 0 and time 1. Since some observation are repeated, I thought of simply running an OLS correcting for student id cluster. A minimum example using an example dataset would be:
Yet when I do that, my SE are actually smaller than when I simply do
which is not what I was expected. My intution was that when clustering my SE should be larger since clusters account for the within id correlation. I am wrong about this?
I have another issue: My data is originally clustered at the school level hence in addition to clustering at the student id I would like to add a school cluster. Is there a way to that in stata?
Thanks
I have a panel dataset with two times (0 and 1). It is unbalanced with students surveyed at time 0 not surveyed at time 1 and students surveyed at time 1 but who were not surveyed at time 0.
I just wanted to check if the time 0 sample and time 1 sample have similar characteristics. I therefore use a variable Y0 collected at time 0 and check whether Y0 is different at time 0 and time 1. Since some observation are repeated, I thought of simply running an OLS correcting for student id cluster. A minimum example using an example dataset would be:
Code:
sysuse bplong.dta, clear reg bp when, cluster(patient)
Code:
sysuse bplong.dta, clear reg bp when
I have another issue: My data is originally clustered at the school level hence in addition to clustering at the student id I would like to add a school cluster. Is there a way to that in stata?
Thanks
Comment