help for svrset

Set variables for replication-based survey data analysis

svrset set key value [key value [...]]

svrset clear [key [key [...]]]

svrset list [key [key [...]]]


key Description -------------------------------------------------------------------- meth Method of replication (brr, jk1, jk2, jkn) pw Main analysis pweight rw Replication weights dof Degrees of freedom for variance estimation fay Constant for Fay's method (BRR method only) psun Counts of number of PSU's per stratum (JKn method only) --------------------------------------------------------------------


svrset sets the key variables for use by replication-based survey analysis routines (see svr and survwgt).

The survwgt command can be used to create replication weights for use with the svr programs; it will set these options automatically when it generates weights. The {svrset} command is for use with datasets that come with replication weights already calculated.

You must specify these options using svrset or have them set automatically by survwgt; you cannot specify them a part of a svr command.

Note that if you set more than one option with {svrset set}, you must enclose any values with multiple words in quotation marks, so they are understood as a single value to be set.

Once you specifiy these options, they will be remembered if you save your data.

All of the current settings can be reviewed by typing svrset list without arguments:

. svrset list

Settings can be changed simply by setting a different value.

Settings can be erased using the clear subcommand. You must explicitly clear old settings.

. svrset clear rw

To clear all settings, type

. svrset clear

The key survey replication variables

svrset set meth specifies the replication method to be used to calculate (co)variances of estimates. The available options are brr, jk1, jk2, and jkn. See survwgt for information on the various methods.

svrset set pw specifies the name of a numeric variable that contains the full sample weighting variable (i.e., the full sample pweight.

svrset set rw specifies a numeric varlist that contains the replication weights.

svrset set dof sets the degrees of freedom for variance estimates.

svrset set fay sets the constant to be used in Fay's variant of the BRR method. This option is not valid with other methods, and will be set to zero automatically.

svrset set psun sets the number of PSUs in each stratum, for use with the jkn method. This method requires this information for the proper calculation of variance estimates. There must be one number set for each replicate. Thus, a design involving two strata, with two PSUs in the first stratum and three PSUs in the second, would have psun set to "2 2 3 3 3".


. svrset set pw mainwgt rw "rep1 rep2 rep3 rep4 rep5"

This would set the main analysis weight to "mainwgt", and specify five sets of replication weights, "rep1" through "rep5".

. svrset set meth brr

. svrset list

. svrset clear rw

Also see

On-line: help for svr, survwgt, svy


Nick Winter Cornell University nw53@cornell.edu