-------------------------------------------------------------------------------
help for svrmean, svrtotal, svrratio
-------------------------------------------------------------------------------

Estimate means, totals, ratios, and proportions for survey data, with replication-based standard errors

svrmean varlist [if exp] [in range] [, common_options]

svrtotal varlist [if exp] [in range] [, common_options]

svrratio varname [/] varname [varname [/] varname ...] [if exp] [in range] [, common_options]

where common_options are

by(varlist) [complete|available] nolabel level(#) ci deff deft meff meft obs size

svrmean, svrratio, and svrtotal typed without arguments redisplay previous results. Any of the following options can be used when redisplaying results:

level(#) ci deff deft meff meft obs size

These commands are for use with replication weights. You must set your data for replication based survey estimation with svrset or survwgt before using these commands.

Description

svrmean, svrtotal, and svrratio produce estimates of population means, totals, ratios, and proportions. Standard errors are calculated using a series of user-supplied replication weights, by balanced repeated replication (BRR) or the survey jackknife (JK1, JK2, or JKn). This is an alternate method to the Taylor series linearization methods used by Stata's svy commands. See survwgt for details on the creation of weights and estimation of variances with replication.

Estimates for multiple subpopulations can be obtained using the by() option. The if option will give estimates for a single population. (Note that with replication methods, use of if or in produces correct estimates for the relevant subpopulation; this is not the case with svy commands.)

svytest will operate after these commands, as it does after their svy-based equivalents.

Options

by(varlist) specifies that estimates be computed for the subpopulations defined by different values of the variable(s) in the varlist.

nolabel can only be specified when by() is specified. nolabel requests that numeric values rather than value labels be used to label output for subpopulations. By default, value labels are used.

[complete|available] specifies how missing values are to be handled. complete specifies that only observations with complete data should be used. available specifies that all available nonmissing values be used for each estimate.

If neither complete nor available is specified, available is the default when there are missing values and there are two or more variables in the varlist (or four or more for svyratio). complete must be specified to compute the covariance or to use svytest after running the command; see help svytest.

level(#) specifies the confidence level (i.e., nominal coverage rate), in percent, for confidence intervals; see help level.

ci requests that confidence intervals be displayed. If no display options are specified then, by default, confidence intervals are displayed.

deff requests that the design-effect measure deff be displayed. If no display options are specified then, by default, deff is displayed.

deft requests that the design-effect measure deft be displayed. See [R] svymean for a discussion on deff and deft.

meff requests that the meff measure of misspecification effects be displayed.

meft requests that the meft measure of misspecification effects be displayed. See [R] svymean for a discussion of meff and meft.

obs requests that the number of observations used for the computation of the estimate be displayed for each row of estimates.

size requests that the estimate of the (sub)population size be displayed for each row of estimates. The (sub)population size estimate equals the sum of the weights for those observations used for the mean/total/ratio estimate.

Examples

{inp:. svrmean birthwgt . svrmean birthwgt, by(race) . svrmean birthwgt if race==1

. svrratio hdresult/tcresult

Methods and formulae

See survwgt.

Acknowledgements

These commands consists largely of the ado file code from official Stata's svy_x command, which underlies svymean, svytotal, and svyratio. They are modified to calculate (co)variances differently. I would like to thank Bobby Gutierrez at StataCorp for advice on implementation of BRR.

Author

Nick Winter Cornell University nw53@cornell.edu