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

# st: Testing whether two estimated survey means are statistically different

 From "Andrew Wade" To statalist@hsphsun2.harvard.edu Subject st: Testing whether two estimated survey means are statistically different Date Thu, 20 Oct 2011 01:45:14 +1100

```Hello,

I want to test the hypothesis that the estimated mean of a specific sub-population, is not statistically different from the estimated mean of the whole population.

The means are generated from a complex survey, using two separate operations of the svy: mean command.

My reading of the documentation is that this type of test, when using svy: mean, should be conducted using lincom.

The problem is that lincom can only be applied (it would appear) to the most recent mean estimate.
However, to estimate the means of interest, I first have to estimate the svy: mean for the population, and separately use the svy:mean, over, command to estimate the mean for the specific sub-population of interest.

Is there a way of 'loading' into the lincom command a previously stored mean and variance estimate, to then test against a separate estimate?

And presumably, the fact that one of the means of interest is a sub-population of the other mean, is a potential problem?

Or should I simply use the manual ttesti command for this test?

The code for this is:

ttesti 6047 293.9012 9256.260402 79889 767.4463 39570.47905

The n values here are the weighted population counts.
As noted above, the 6047 is a subset of the 79889.

(it is notable here that the CI's for the two means overlap, but that the test doesn't find the two estimates to be statistically difference from each other)

Or should I assume unequal variances...

ttesti 6047 293.9012 9256.260402 79889 767.4463 39570.47905 , unequal

This 2nd ttesti approach does find the estimates to be statistically different to each other, due to a much lower s.e. estimate.

Keen for any suggestions.

Regards,

Andrew

The Allen Consulting Group

Level 9, 60 Collins Street, Melbourne VIC 3000
T: 03 8650 6000 | DDL: 03 8650 6043 | F: 03 9654 6363 | M: 0448 367 298