I’m confused by exactly how a random effects regression works in panel data using Stata. Take for example a logit regression in panel data, assuming that there are three waves of data, as follows:
Conceptually, I understand that in a fixed effects regression, Stata would focus on a singular person and determine if that individual person’s dependent variable had changed across waves of data in this panel, repeating this for all qualifying individuals in the sample. This often leads to small sample sizes.
However, in the case of a random effects regression, the sample size that Stata uses in the analysis is generally significantly larger, which leads me to believe that individuals are treated differently in this kind of a regression.
Are individual waves in the panel added together to make one larger wave where the effect of the independent variable on the dependent variable is considered? I would then assume that the wave in which the affect of the IV on the DV in wave 1 is no longer considered and that the focus switches just to the relationship between the IV and the DV, regardless of wave. Basically, that the data is treated as one large single wave sample in a random effects regression, much like in a simple linear ols regression of non-panel data.
But is this the case? Can somebody explain to me what Stata is doing in a random effects regression, and how this translates into the sample that one ends up with at the end of this regression?
Very best,
J
Code:
xtlogit IV DV, re nolog
However, in the case of a random effects regression, the sample size that Stata uses in the analysis is generally significantly larger, which leads me to believe that individuals are treated differently in this kind of a regression.
Are individual waves in the panel added together to make one larger wave where the effect of the independent variable on the dependent variable is considered? I would then assume that the wave in which the affect of the IV on the DV in wave 1 is no longer considered and that the focus switches just to the relationship between the IV and the DV, regardless of wave. Basically, that the data is treated as one large single wave sample in a random effects regression, much like in a simple linear ols regression of non-panel data.
But is this the case? Can somebody explain to me what Stata is doing in a random effects regression, and how this translates into the sample that one ends up with at the end of this regression?
Very best,
J
Comment