Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: weighted t-test


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: weighted t-test
Date   Wed, 18 Jan 2012 21:06:59 -0500


1. Use [pw = ] for survey data.  And, if there are strata and clusters, they should appear in the -svyset- statement.

2. your -svy reg- statment would give you the same gender difference  if you had typed:
   -svy: reg nr_pos i.gender-

3. Your question is fuzzy.

Suppose  the population means of x for males and females are:
  males:   m1 = 40
 females:  m2 = 60
Then the difference is m2 - m1 = 20

If m is the population mean, then   m1 < m < m2, because  m is a weighted mean of the males and females, weighted by their proportions in the population. If the weights are 50% and 50%, then m = 50 in our case.

Thus you can see that if  m1 = m2, then m = m1 and m= m2.  If m1 < m2  the m1< m and m2>m.  If m1> m2 then m1 > m and m2 < m. 

Steve
[email protected]



 

It statesFirst of all, estimates and tests are about the population, not the sample,



Are you asking if mean_1 - mean_2  is the same as the population mean-?  If so, the answer is "no".
On Jan 18, 2012, at 9:26 AM, rosa wrote:

Hi,

I want to perform a weighted t-test using survey data. Given I cannot
apply the 'ttest' command together with 'svy', I am using the 'lincom'
command (as learned in stata's FAQ).

My question is: Is testing the difference between different groups
(x1-x1) the same as testing whether the difference between groups is
significantly different than the average of the sample?

This is what I've  done:

svyset count [iw= WEEGFACT]
tab gender, gen(x)
sum x1 x1
svy: reg nr_pos x1 x2, nocons
lincom x1-x2

Thank you in advance.

Rose
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index