A couple of new things for testing:
1) (Limited) support for Stata under the "foreign" command.
This is documented in chapter 37 of the User's Guide, with a
simple example. I've found it convenient for comparing results
with stata. Works fine on Linux but I have no idea about on
Windows, would be interesting to hear. It's assumed the stata
executable is called "stata" and is in the PATH.
2) The beginnings of cluster-robust standard errors. Currently
only for ols and tsls but could be extended. Not documented
yet, but the syntax is just, e.g.,
ols y 0 Xlist --cluster=clustvar
where "clustvar" is a series in the dataset with at least two
distinct values over the estimation range. (It's in the GUI
too, under the "Configure" button if you check "Robust
standard errors" in the model specification dialog.)
Just for fun here's the User's Guide script which shows both
new things:
<hansl>
function matrix stata_reorder (matrix se)
# stata puts the intercept last, but gretl puts it first
scalar n = rows(se)
return se[n] | se[1:n-1]
end function
open data4-1
ols 1 0 2 3 --cluster=bedrms
matrix se = $stderr
foreign language=stata --send-data
regress price sqft bedrms, vce(cluster bedrms)
matrix vcv = e(V)
gretl_export vcv "vcv.mat"
end foreign
matrix stata_vcv = mread("(a)dotdir/vcv.mat")
stata_se = stata_reorder(sqrt(diag(stata_vcv)))
matrix check = se - stata_se
print check
</hansl>
Allin
Show replies by date