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

Re: st: test stored estimates (was "Including population mean in svymean by subpops")


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: test stored estimates (was "Including population mean in svymean by subpops")
Date   Tue, 21 Jan 2003 16:09:11 -0600

Arnold <[email protected]> asks about -estimates for-:

> I stored results from two separate models and tried without success to test
> equality of parameters across the two result-sets. Here's the sequence:

>     svymean varname1
>     est store A
>     svymean varname2
>     est store B
>     est for * (or _all) : test [varname1]x = [varname2]y

> For the post-estimation command, I also tried each of the following:

>     test A = B
>     test [A] = [B]
>     test [A=B], common

> In each case, the return said the query to one set of estimates failed in
> the other set of estimates -- which, of course, is true, but I thought from
> the manual that this wouldn't be a program-stopper. I tried with non-survey
> commands (e.g., logit) and got the same results. Help?

There are two issues here:

1.  How does -estimates for- work?

The description of -estimates for- in [R] estimates (from the Stata 8 manual
set) says, "... evaluates a post-estimation command for one or more stored
estimation sets."  Thus, for example, one could type:

	est for res1 res2 res3 : test x1 = x2

instead of typing

	tempname curres
	qui est store `curres'
	foreach res in res1 res2 res3 {
		est restore `res'
		test x1 = x2
	}
	est restore `curres'

Thus, testing parameters across estimation results is not a feature of
-estimates for-.

2.  How does one go about testing coefficients across different estimation
results?

I would start with [R] suest.

--Jeff
[email protected]
*
*   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