Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: OLS equivalence for unbalanced panel |
Date | Thu, 4 Jul 2013 18:36:17 +0000 |
Silviya, This can happen in finite samples with the 2-step RE estimator. You can try using different methods for estimating the variance components - either the -sa- option (which uses the Swamy-Aurora method) or the -mle- option - to see if it makes a difference. HTH, Mark > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner- > statalist@hsphsun2.harvard.edu] On Behalf Of Silviya Nikolova > Sent: 04 July 2013 18:10 > To: statalist@hsphsun2.harvard.edu > Subject: st: OLS equivalence for unbalanced panel > > Dear Statalist, > > I am estimating RE model (xtreg) using unbalanced panel dataset. Sigma_u for > some reason is 0. My dependent variable is discrete with large variation. To > understand why this is the case, I tried: > 1. Add some iid normal noise to the data > 2. Drop groups with small number of observations in them > These two approaches do not make a difference. > 3. Reduce the number of variables (after sufficient number of dropped > variables sigma_u became > 0). > 4. Expand the data using --expand 2-- command. This generates non-zero > sigma_u as well. > Is there any reasonable explanation for all 4 of these? 2 and 3 in isolation can > be explained easily. > > This is a snippet of the output before expand: > > . xtreg q2_OHS ISTC q1_OHS ${q1_eq5d_elem_nf} q1_eq5d_health_scale > ${other_health_nf} ${comorbs_nf} ${pa > > tients_nf_`severity'} ${provider_nf}, re > > Random-effects GLS regression Number of obs = 36090 > Group variable: procode1 Number of groups = 246 > > R-sq: within = 0.2200 Obs per group: min = 1 > between = 0.6405 avg = 146.7 > overall = 0.2415 max = 1017 > > Wald chi2(45) = 11473.56 > corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 > > > -------------------------------------------------------------------------------------- > > . . . > > ---------------------+---------------------------------------------------------------- > sigma_u | 0 > sigma_e | 8.2124003 > rho | 0 (fraction of variance due to u_i) > -------------------------------------------------------------------------------------- > > > > And after expand: > > . preserve > > . expand 2 > (133799 observations created) > > . xtset procode1 > > . xtreg q2_OHS ISTC q1_OHS ${q1_eq5d_elem_nf} q1_eq5d_health_scale > ${other_health_nf} ${comorbs_nf} ${pa > > > tients_nf_`severity'} ${provider_nf}, re > > Random-effects GLS regression Number of obs = 72180 > Group variable: procode1 Number of groups = 246 > > R-sq: within = 0.2200 Obs per group: min = 2 > between = 0.6400 avg = 293.4 > overall = 0.2409 max = 2034 > > Wald chi2(45) = 20798.64 > corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 > > -------------------------------------------------------------------------------------- > > . . . > > ---------------------+---------------------------------------------------------------- > sigma_u | 1.115697 > sigma_e | 8.1965088 > rho | .01819121 (fraction of variance due to u_i) > -------------------------------------------------------------------------------------- > > . restore > > > Thank you. > > Silviya > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ ----- Sunday Times Scottish University of the Year 2011-2013 Top in the UK for student experience Fourth university in the UK and top in Scotland (National Student Survey 2012) We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/