On Sun, 2 Dec 2018, Davide Bertani wrote:
Dear Sven;
Thank you again, very very much, for your help.
I tried to do as you suggested, and everything went well until I tried to
add the p value (written as "$pvalue") among the accessors. At that point,
in the results column, under "p value" gretl did not return the required p
value but instead the word "nan" (not a number).
The $pvalue accessor is not available for regression coefficients.
You need to decide between one-tailed or two-tailed. For a two
tailed test this would do the job (since the pvalue() function gives
you the right-tail probability):
pval = 2 * pvalue(z, abs($coeff[i] / $stderr[i]))
That's for coefficient i. Note that coefficient 1 is the constant,
so for a single independent variable you probably want i = 2.
Allin Cottrell