

Re: st: lincom & svy commands

From   Steven Samuels <>
Subject   Re: st: lincom & svy commands
Date   Thu, 23 Oct 2008 16:01:25 -0400

Stas has provided a detailed discussion, and Maarten has already shown you the formula that -lincom- uses. If you do not understand the relationship between -lincom- (a t-test) and the regression approaches that Stas presented, consult the text for any graduate statistics course which includes regression. I will answer your second question.

Alternative ii will be more precise in your example. Analyses with clustered data (from surveys or not) should never ignore the clustering.

When you examine difference within the same cluster, each cluster serves "as its own control". Here is a simple example with 4 clusters. Assume that the number of observations within cluster is equal.

Cluster	  Before-Mean	After-Mean   difference
1           5              4          1
2          10              8          2
3          15              11         4
4          20              16         4

The differences are much less variable (range = 4) then the original observations (ranges = 15, 12).

What are the consequences? If you apply your option i, then: n= 8, and the before-after difference is 2.75, with a SE = 4.10 and the two-sample t-test has p = .52

If you treat the data as clustered (option ii), the before/after difference is still 2.75 with n=4 clusters, but, the se = 0.75 and the one-sample paired t-test has p= 0.03

Now, this is just an ordinary paired t-test example utilizing the cluster means as responses. Stata's survey programs account for unequal sample-sizes within cluster and occasion. You ask for what - lincom- (or the regression equivalents) "actually" do. The equations are a bit complicated and depend on the choice of variance estimate (linearization, jackknife, bootstrap, balanced-repeated- replications). You can view generalized versions of the equations in the Stata survey manual or in any book on survey sampling. Take a look, for example, at Sharon Lohr, Sampling: Design and Analysis. Duxbury, 1999, Chapter 9. However, the logic with before/after data is the same.


On Oct 23, 2008, at 11:18 AM, Bell, Jacqueline S. wrote:


This is a follow-on to a previous message I sent this month asking about how lincom calculates standard errors when clustering is present.

Can anyone advise me on what lincom actually does when estimating differences in parameters from svy:mean or svy:prop?

I have before/after data which is not paired at an individual level, but has a cluster structure. In these circumstances it is not obvious how lincom goes about estimating the before/after difference.
The two alternatives suggested to me are:
i) it estimates before and after separately for the whole population, then estimates the difference ii)it estimates the difference in each cluster, and then the overall difference.

In the data there are (in most cases) before and after data for each cluster, but often quite severe imbalances in samples before/ after within cluster.

Thanks for any help, Jacqui


*   For searches and help try:

*   For searches and help try:
