| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: error r(7) from outreg
Nirina wants outreg to work with ivreg2. Her codes does not work
because ivreg2 does not always return a number in its scalars. In
other words, e(cdchi2) is probably missing from her regression result.
The following codes will work.
sysuse auto,clear
ivreg2 mpg price (headroom=rep78)
outreg using ivjune22, br addstat(F-stat, e(F), sargan, e(sargan))
The following code will not work because some of the scalars are
missing from ivreg2 scalars.
outreg using ivjune22, br addstat(F-stat, e(F), cragg, e(cdchi2), craggp,
e(cdchi2p), craggF, e(cdf), sargan, e(sargan), sarganp, e(sarganp))
To see what is contained or missing from ivreg2 scalars, type these:
ssc install outreg2, replace
outreg2 using ivjune22, br e(all) seeout
Her new codes would look like this:
outreg2 using ivjune22, br addstat(F-stat, e(F), cragg, e(cdchi2), craggp,
e(cdchi2p), craggF, e(cdf), sargan, e(sargan), sarganp, e(sarganp))
seeout
Roy
I am not very familiar with outreg yet but following the help and
using it after using ivreg2,
outreg using ivjune22, br addstat(F-stat, e(F), cragg, e(cdchi2),
craggp, e(cdchi2p), craggF, e(cdf), sargan, e(sargan), sarganp,
e(sarga> np))
I get the following message:
e(cdchi2) found where number expected in addstat() option
r(7);
Thanks in advance for your response;
Nirina.
_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/