Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: results of -testparm- in table by estimate


From   "Jann Ben" <[email protected]>
To   <[email protected]>
Subject   st: RE: results of -testparm- in table by estimate
Date   Thu, 25 Aug 2005 22:29:11 +0200

You'd have to have to save the estimates AFTER 
applying -check-. Thus, type

 reg y x*  w1 w2
 check
 est store regr1
 est table regr1 , stats(N myp)

Have you seen -estadd- (ssc d estadd)? With -estadd- 
you could do things such as

 program define estadd_check, eclass
   testparm x*
   ereturn scalar myp=r(p)
 end

 reg y x* w1
 est store regr1
 reg y x* w1 w2
 est store regr2
 estadd *, s(check)
 est table *, stats(N myp)

ben
 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of E. 
> Michael Foster (UNC_SPH)
> Sent: Thursday, August 25, 2005 5:08 PM
> To: [email protected]
> Subject: st: results of -testparm- in table by estimate
> 
> 
> Hi,
> 
> I want to feed the results of -testparm- to -est-, but -testparm-
> outputs r-class not e-class (and my understanding is that -est- can
> include e() scalars)
> 
> so, I tried to trick the program (famous last words)
> 
> program define check , eclass
>  	testparm x*			// the regressors in 
> question start with x
>  	ereturn scalar myp=r(p)	// an -ereturn list- shows this worked
>  	end
> 
>       reg y x*  w1 w2 // and so on
>       est store regr1
>       est for regr1 : check
> 
>        est table regr1 , stats(N myp)
> 
> No sign of myp in the table!  just a blank row, appropriately 
> labelled.
> 
> Where am I screwing up?
> 
> professor of maternal and child health
> university of north carolina
> 
> *
> *   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/
> 

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index