On Tue, 7 Jan 2014, Riccardo (Jack) Lucchetti wrote:
On Tue, 7 Jan 2014, Lovrenc Pfajfar wrote:
> Dear Gretl-users,
> Can somebody tell me, how exactly (formula) is calculated Durbin's h
> statistic in Gretl.
h = pmod->rho * sqrt(T / (1 - T * se * se));
where "T" is the number of observations, "pmod->rho" is the sample
autocorrelation of the ols residuals and "se" is the estimated standard error
of the lagged dependent variable.
Actually there was a slight problem here: The "T" we've been using is the
number of observations minus 1, while it should just be the number of
observations. (Of course this makes no difference asymptotically.) This is
now fixed in CVS. Test script:
ols QNC 0 PRICE INCOME QNC(-1)
n = $T
se = $stderr
h = $rho * sqrt(n/(1-n*se^2))
The manually calculated h should now agree with what gretl prints.