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

st: results of -testparm- in table by estimate

From   "E. Michael Foster (UNC_SPH)" <>
Subject   st: results of -testparm- in table by estimate
Date   Thu, 25 Aug 2005 11:08:25 -0400


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

      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:

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