bkoksal wrote:How do we get confidence intervals after the regressions? Thanks for any help.
*
* @RegConfidence(options)
* Regression post-processor to show table of confidence intervals for coefficients
*
* Options:
* CONFIDENCE=confidence level[.95]
* STDERRS=number of standard errors [not used]
*
* If you use STDERRS (for instance, STDERRS=2), you will get that specific
* multiple of standard errors +/- for the bounds. Otherwise, the value of the
* CONFIDENCE option will be used with the current degrees of freedom to determine
* the multiple.
*
* Revision Schedule:
* 06/2008 Written by Tom Doan, Estima
*
procedure RegConfidence
option real confidence .95
option real stderrs
*
local real k
local integer i
*
if %defined(stderrs)
compute k=stderrs
else
compute k=%invttest(1-confidence,%ndf)
report(action=define)
report(atrow=1,atcol=1) "Label"
report(atrow=1,atcol=2,align=center) "Coefficient" "Lower" "Upper"
do i=1,%nreg
report(atrow=i+1,atcol=1) %eqnreglabels(0)(i) %beta(i) $
%beta(i)-k*%stderrs(i) %beta(i)+k*%stderrs(i)
end do i
report(atcol=2,tocol=4,action=format,width=9)
report(action=show)
endReturn to General Econometrics
Users browsing this forum: No registered users and 1 guest