Scott/Michael,
Many thanks to both of you for your helpful (and generous) responses. I'm
sure you'll understand if I report back to you in one.
Starting with Michael's solution first, I tried to run this, following him
to the letter:
. do "C:\Documents and Settings\Administrator\Local
Settings\Temp\STD01000000.tmp"
. tempvar e xbgls nindg sigg arg perg
. tempname sig sumg LR
. bys `1': gen `nindg'=_N
varlist required
r(100);
end of do-file
r(100);
I'm not sure what to say about this. I did consider swapping n for N, but
this didn't seem appropriate given the contents of the rest of the code.
By way of contrast, Scott's solution worked perfectly, sic.:
. xtgls conch euconch, c(p) p(h) force
Cross-sectional time-series FGLS regression
Coefficients: generalized least squares
Panels: heteroskedastic
Correlation: panel-specific AR(1)
Estimated covariances = 576 Number of obs = 2840
Estimated autocorrelations = 576 Number of groups = 576
Estimated coefficients = 2 Obs per group: min = 3
avg = 4.930556
max = 6
Wald chi2(1) = 1635.92
Log likelihood = -8031.751 Prob > chi2 = 0.0000
----------------------------------------------------------------------------
conch | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------+----------------------------------------------------------------
euconch | .2663618 .0065855 40.45 0.000 .2534544 .2792693
_cons | -2.052489 .060968 -33.67 0.000 -2.171984 -1.932994
----------------------------------------------------------------------------
. gwhet2
Testing for Groupwise heteroscedasticity
Ho: homoscedasticity
H1: groupwise heteroscedasticity by pano
chi2 (575) = 543.80
Prob>chi2 = 0.8205
No prizes for guessing which solution I prefer. Thanks once again.
Now to tackle the problem of autocorrelation in my -xtgls- models, which
I'm still finding regardless of whether I use -c(p)- or -c(a). Any
contributions gratefully received.
CLIVE NICHOLAS |t: 0(44)191 222 5969
Politics Building |e: [email protected]
School of Geography, |f: 0(44)870 126 2421
Politics & Sociology |
University of |
Newcastle-upon-Tyne |
Newcastle-upon-Tyne |
NE1 7RU |
United Kingdom |http://www.ncl.ac.uk/geps
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/