On Wed, 26 Oct 2016, Artur T. wrote:
Dear all,
is there any (implemented) way to:
A) Obtain both the within R^2 after a FE-panel estimation? Currently
$rsq only accesses the LSDV R^2 (which is off less importance in my
view). Maybe one could add the accessor $wrsq.
B) Can one obtain the Durbin-Watson test statistics (which is reported
anyway) using a build-in accessor? I had a look for it but couldn't find
anything. However, $rho works fine, and $dwpval also works but takes
quite a while for a medium-dimension micro panel.
This reminds me of something I've been meaning to document for a while
(I'll try to get to it soon). After estimation of a single-equation
model the new accessor $model retrieves a bundle containing all the
regular model accessors plus some other information. To get the
regular accessors you just use the accessor-name, minus the $-sign, as
the key, as in
ols y 0 x
bundle b = $model
series uhat = b.uhat
The "other information" depends on the estimator: hopefully the keys
should give a reasonable idea of what's represented (but we'll see
about adding doc).
Anyway, the two things you mentioned weren't included in the $model
bundle for a fixed-effects model, but now they are (in git and
snapshots). Ss, for example, the script
<hansl>
open abdata.gdt
panel WAGE 0 EMP CAP
bundle b = $model
print b
</hansl>
produces:
bundle b:
fixed_effects_F (bundle)
xlist (matrix: 1 x 3)
lnl = -2200.21
ahat (series: length 1260)
command = panel
hqc = 4950.54
Fstat = 41.776
n_included_units = 140
yhat (series: length 1260)
DW = 0.928223
ylist = 4
T = 1031
depvar = WAGE
within_F (bundle)
bic = 5385.66
sigma = 2.20166
Tmax = 9
sample (series: length 1260)
uhat (series: length 1260)
vcv (matrix: 3 x 3)
trsq = 895.803
aic = 4684.42
coeff (matrix: 3 x 1)
df = 889
Tmin = 7
within_R2 = 0.0213909
ess = 4309.24
ncoeff = 3
rsq = 0.868868
rho = 0.367727
stderr (matrix: 3 x 1)
Note the keys "within_R2" and "DW".
Allin