SHAZAM Community
Ask Your Question

Revision history [back]

See page 432 of the SHAZAM 11 manual.

This can be done by looking up the t-value from the distribution using the DISTRIB command.

* Store the t-ratios from the regression
ols consume income  / tratio=tr

* Set the sample to the number of regressors using the temporary variable $k
sample 1 $k

* Seek value from distribution
genr tr=abs(tr)
distrib tr / type=t df=$df cdf=cdf

* Now get the p-value for a 2-sided test.
genr p_val=2*(1-cdf)
print tr p_val

See page 432 of the SHAZAM 11 manual.

This can be done by looking up the t-value p-value from the distribution Student's t-distribution using the DISTRIB command.

* Store the t-ratios from the regression
ols consume income  / tratio=tr

* Set the sample to the number of regressors using the temporary variable $k
sample 1 $k

* Seek value from distribution
genr tr=abs(tr)
distrib tr / type=t df=$df cdf=cdf

* Now get the p-value for a 2-sided test.
genr p_val=2*(1-cdf)
print tr p_val