# SAS and the Complex Sample Survey

#### sfbaywalk

##### New Member
I had the theory in grad school, but have not implemented. So I am instructing my SAS programmer colleague on what I want.

I am looking at a U.S. natl survey. The sample is multi-tiered. One of the variables is finalwgt, defined as Final Weight after accounting for strata, clusters, etc.

1. For finding the mean for a variable like age, what PROC do I tell him to use to incorporate the weights into the Point Estimate and the Standard Error?

2. Am I still on safe ground, if we have censored all the non-respondents?

Now for the tricky part. We are manipulating a couple of variables to produce a Yes-No measure, and we are censoring non-response. Then we want to find percent Yes.

In my mind, we multiply the weights times the zeros and ones. We sum the new column and divide by the sum of the weights (including the Yes and No, but omitting the non-response).

3. Does this make sense to you for a point estimate?

4. How do I instruct him to derive a confidence interval for the percent Yes?

TIA

#### TheAnalysisFactor

##### New Member
Hi TIA,

I can't answer all your questions, but I do know that you want to use PROC SURVEYMEANS. It's important that you not only specify weights, but also the strata and clustering structure. The weights will get you a correct point estimate, but specifying the sampling structure gets you correct standard errors.

The manual for it is at http://faculty.smu.edu/slstokes/stat6380/surveymeans.pdf.

If you google it, you'll get more references.

As for the point estimate of the 1/0 variable, just taking the mean is also the proportion of 1s. So calculating the mean using Surveymeans will get you the right point estimate, but I'm not sure about the standard error. Anyone else a survey statistician?

Karen