Stata 15 help for svygen

Title

[SVY] svygen -- Generating adjusted sampling weights

Syntax

Poststratification adjusted sampling weights

svygen poststratify new_weight_var [weight] [if] [in] [, poststrata(varname) postweight(varname) nocheck]

Balanced repeated replicate (BRR) weights

svygen brr stub [weight] [if] [in], Hadamard(matname) strata(varname) [psu(varname) fay(#) poststrata(varname) postweight(varname) nocheck]

Jackknife replicate weights

svygen jackknife stub [multiplier] [weight] [if] [in] [, strata(varname) psu(varname) fpc(varname) poststrata(varname) postweight(varname)]

Successive difference replicate (SDR) weights

svygen sdr stub [weight] [if] [in], Hadamard(matname) [psu(varname) poststrata(varname) postweight(varname) nocheck]

pweights and iweights are allowed; see weights.

Description

svygen generates adjusted weights for survey data analysis.

svygen poststratify generates sampling weights that are adjusted according to the poststratification weights.

svygen brr generates BRR weights for designs with two primary sampling units per stratum.

svygen jackknife generates delete-1 jackknife replicate weights.

svygen sdr generates SDR weights.

Options

poststrata(varname) specifies the name of a variable (numeric or string) that identifies the poststratum groups.

postweight(varname) specifies the name of a numeric variable that contains the poststratum counts in the population.

nocheck prevents svygen poststratify from checking the validity of the poststratum counts. This option helps speed things up when svygen is called within a loop, but it should only be used once the counts have been validated.

hadamard(matname) (brr and sdr only) specifies the name of a Hadamard matrix. The Hadamard matrix matname is a square matrix H with k columns, such that HH' = kI(k), where I(k) denotes the identity matrix with k columns.

For svygen brr, k must be larger than or equal to the number of strata identified in the strata() option.

For svygen sdr, k must be larger than or equal to the number of primary sampling units (PSUs).

fay(#) (brr only) specifies Fay's adjustment. The sampling weights of the selected PSUs for a given replicate are multiplied by 2-#, while the sampling weights for the unselected PSUs are multiplied by #. fay(0) is the default and is equivalent to the original BRR method.

# must be a number between 0 and 2; however, fay(1) is not allowed.

strata(varname) (brr and jackknife only) specifies the name of a variable (numeric or string) that contains stratum identifiers. strata() is required by brr.

psu(varname) (brr and jackknife only) specifies the name of a variable (numeric or string) that contains identifiers for the PSUs (clusters).

fpc(varname) (brr and jackknife only) specifies the name of a numeric variable that contains finite population corrections for the variance estimates.

Examples

. svygen brr brrw [pw=sampwgt], H(h12) strata(strid) psu(psuid) . svygen jackknife f jkw [pw=sampwgt], strata(strid) psu(psuid) . svygen sdr sdrw [pw=sampwgt], psu(psuid) . svygen post pwgt [pw=sampwgt], posts(strid postid) postw(totals)


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index