Sebastien Rodrigue-Prive wrote: > Here it's my programation with Gretl : > > open mensuelmemoire-sanslesnulles-160310 > # create big list of variables > list biglist = I*EX I*IM > # create a list of regresor > list reg1list = TREND PRE911 POST911 TX_CHG Jan Fev Mar Avr Mai Juin Juil > Aou Sep Oct Nov Dec DICHO_OCT > # full results matrix, start empty > matrix Res = {} > > loop foreach i biglist > > # create multiplicator > > # diminuer leS VARIABLES ( / 1 000 000) > PIB_IND_C_ = PIB_IND_C / 1000000 > PIBN_US_ = PIBN_US / 1000000 > series $i_def = $i / (PIB_IND_C_ * PIBN_US_) / DEF_US > # run the regression > ols $i_def 0 reg1list > # grab the coefficient and stan-error > matrix res = $coeff' | $stderr' > # and add to the big results matrix > Res = Res | res > endloop > > # open a fil to write down the results > outfile "results par un million 100504-1.txt" --write > printf "%#12.6g", Res > outfile --close > > > Everythings worked very well. > The problem it's when I want to get in my res matrix the value of my > coefficient and my the value of my critical-p... doesn't work. > > I tried $pvalue, doesn't work. I really need to get out the critical-p > for my presentation.
P-values for the coefficients, being derived results, are not available via a direct accessor; you need to use the pvalue() function. To get the two-sided p-values that are printed in the gretl output you'd do something like this: open data9-7 ols 1 0 2 3 4 matrix pvals = 2 * pvalue(t, $df, abs($coeff ./ $stderr)) print pvals Allin Cottrell