Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

FW: st: statistical test to compare two survey means from two estimating equations


From   "Brent Fulton" <[email protected]>
To   <[email protected]>
Subject   FW: st: statistical test to compare two survey means from two estimating equations
Date   Mon, 4 Dec 2006 17:50:16 -0800

Hi Austin,

Thank you for your reply. If I'm comparing fixed numbers, I agree that if
there is a difference between MI and non-MI, then there necessarily has to
be a difference between MI and the nation. However, I don't think this is
necessarily the case with a sample--there may not be a statistical
difference between MI and non-MI, while at the same time there could be a
statistical difference between MI and the nation. For example, if the mean
of MI is 0.00001 above non-MI (and MI's mean is based on many observations),
then the national estimate will be more precise than the non-MI estimate,
making the above theoretically possible.

However, the above theoretical possibility wasn't the main motivation for my
question. The question is motivated by interpretation that I see in many
papers that compare the a state's mean with the nation's mean, where both
means are based on individual-level data within a state.

Also, I am not sure if you've seen the following. Suits, Daniel B.(1984),
"Dummy Variables: Mechanics V. Interpretation," The Review of Economics and
Statistics, 66(1): 177-180, estimates a regression model that uses dummy
variables (e.g., state dummies), which are constrained to sum to zero and no
dummy nor the constant is omitted. The interpretation of the state dummy is
how the state differs from the national average (instead of how it differs
from the omitted state in a typical regression with dummy variables).

For example using 50 states plus DC, where $dependent_var is 0/1:

#delimit ;
constraint 1
[1]statedums1+[1]statedums2+[1]statedums3+[1]statedums4+[1]statedums5+[1]sta
tedums6+
[1]statedums7+[1]statedums8+[1]statedums9+[1]statedums10+[1]statedums11+[1]s
tatedums12+
[1]statedums13+[1]statedums14+[1]statedums15+[1]statedums16+[1]statedums17+[
1]statedums18+
[1]statedums19+[1]statedums20+[1]statedums21+[1]statedums22+[1]statedums23+[
1]statedums24+
[1]statedums25+[1]statedums26+[1]statedums27+[1]statedums28+[1]statedums29+[
1]statedums30+
[1]statedums31+[1]statedums32+[1]statedums33+[1]statedums34+[1]statedums35+[
1]statedums36+
[1]statedums37+[1]statedums38+[1]statedums39+[1]statedums40+[1]statedums41+[
1]statedums42+
[1]statedums43+[1]statedums44+[1]statedums45+[1]statedums46+[1]statedums47+[
1]statedums48+
[1]statedums49+[1]statedums50+[1]statedums51=0;
#delimit cr

mlogit $dependent_var statedums1-statedums51 $independent_vars,
constraints(1) collinear basecategory(0)
*the collinear option was added in Aug 2006; logit doesn't support
constraints so mlogit is used

The above works, but I was wondering if there was a simpler way since I
don't see Suits's method used a lot.

-Brent


-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Austin Nichols
Sent: Monday, December 04, 2006 11:36 AM
To: [email protected]
Subject: Re: st: statistical test to compare two survey means from two
estimating equations


Brent Fulton --
I think the last option is the best:
svy: tab y Michigan_dummy, col se

(the col and se options are important), after which you can
gen p21=.
gen p22=.
mat li e(b)
test p21=p22

Note that the concept of the mean for Michigan being different from
the national mean should rightly be reframed as the the mean for
Michigan being different from the mean for the balance of the nation,
as this reductio ad absurdum will illustrate: think of a sample of 3
people and compare the mean of the balance of the nation to the
national mean (e.g. are all people not named Brent Fulton
significantly more likely to have high blood pressure than the average
American?).

Also note that if you have categorical data, you want to estimate
proportions, not means, and the fact that the mean of a dummy variable
is a proportion does not mean that statistical tests using -svy: mean-
or -svy: reg- are appropriate for categorical dependent variables.

On 12/4/06, Brent Fulton <[email protected]> wrote:
> I'm using Stata 9.2 and my dataset includes a complex survey design with
> pweights and strata IDs, which are states. I have individual-level
> observations within each state and want to perform a simple statistical
> test: does the national mean of variable y equal the state of e.g.,
> Michigan's mean of y, where y is 0/1.
>
> I've run the following and can examine if the e.g., 95% CI's overlap, but
> would like to calculate the p-value that the means are equal.
> .svy: mean y
> .svy: mean y, subpop(Michigan_dummy)
>
> Is there a post-estimation test that can compare the survey-based means
> above?
>
> I've also thought of the following, but both compare Michigan to
> non-Michigan states (not the nation).
> .svy: logit y Michigan_dummy
> .svy: tab y Michigan_dummy
>
>
> Thanks,
> Brent
>
>
> ___________________________________
> Brent D. Fulton, PhD
> Health Services Researcher
> Petris Center at UC Berkeley
> Phone: 510-643-4102
> Fax: 510-643-4281
> Email: [email protected]
> www.petris.org
*
*   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