Just wanted to thank Sven and Allin for their help!! U guys gave me a great hand in solving my problem, and it worked out perfectly in the end. Thanks again friends! have a good day
Davide

Il giorno lun 3 dic 2018 alle ore 01:02 Allin Cottrell <cottrell@wfu.edu> ha scritto:
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
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users