# The SURVEYMEANS Procedure

#### Domain Statistics

When you use a DOMAIN statement to request a domain analysis, the procedure computes the requested statistics for each domain.

For a domain D, let be the corresponding indicator variable:

Let

Let

The requested statistics for variable y in domain D are computed by using the new weights v.

Note that is set to missing if represents a level of a categorical variable and is missing.

##### Domain Mean

The estimated mean of y in the domain D is

where

The variance of is estimated by

where, if , then

and if , then

##### Domain Total

The estimated total in domain D is

and its estimated variance is

where, if , then

and if , then

##### Domain Ratio

The estimated ratio of Y to X in domain D is

and its estimated variance is

where, if , then

and if , then

For domain analysis with poststratification, see the section Poststratification. For quantile estimation in a domain, see the section Domain Quantile. For quantile estimation in a domain with poststratification, see the section Domain Quantile Estimation with Poststratification.