📄 svygen.hlp
字号:
{smcl}
{* 25mar2005}{...}
{cmd:help svygen}{...}
{right:also see: {help undocumented}}
{hline}
{title:Title}
{p 4 16 2}
{hi:svygen} {hline 2}
Generating adjusted sampling weights
{title:Syntax}
{pstd}
BRR replicate weights:
{p 8 15 2}
{cmd:svygen} {opt br:r}
{it:stub} {weight} {ifin}
{cmd:,}
{opt H:adamard(matname)}
{opt str:ata(varname)}
[
{opt psu(varname)}
{opt fay(#)}
{opt posts:trata(varlist)}
{opt postw:eight(varname)}
{opt nocheck}
]
{pstd}
Jackknife replicate weights:
{p 8 15 2}
{cmd:svygen} {opt jack:knife}
{it:stub} [{it:multiplier}] {weight} {ifin}
[{cmd:,}
{opt str:ata(varname)}
{opt psu(varname)}
{opt fpc(varname)}
{opt posts:trata(varlist)}
{opt postw:eight(varname)}
]
{pstd}
Poststratification adjusted sampling weights:
{p 8 15 2}
{cmd:svygen} {opt post:stratify}
{it:new_weight_var} {weight} {ifin}
[{cmd:,}
{opt posts:trata(varlist)}
{opt postw:eight(varname)}
]
{pstd}
{opt pweight}s and {opt iweight}s are allowed; see {help weights}.
{title:Description}
{pstd}
{cmd:svygen} generates adjusted weights for survey data analysis.
{pstd}
{cmd:svygen} {cmd:brr} generates BRR replicate weights for designs with 2
primary sampling units per stratum.
{pstd}
{cmd:svygen} {cmd:jackknife} generates delete-1 Jackknife replicate weights.
{pstd}
{cmd:svygen} {cmd:poststratify} generates sampling weights that are adjusted
according to the poststratification weights.
{title:Options}
{phang}
{opt hadamard(matname)} ({cmd:brr} only) specifies the name of a Hadamard
matrix. The Hadamard matrix {it:matname} is a square matrix {it:H} with
{it:k} columns, such that {it:H}{it:H}' = {it:k}{opt I(k)}; where {opt I(k)}
denotes the identity matrix with {it:k} columns. {it:k} must be larger than
or equal to the number of strata identified in the {opt strata()} option.
{phang}
{opt fay(#)} ({cmd:brr} only) specifies Fay's adjustment.
The sampling weight of the selected PSUs for a given replicate are multiplied
by {hi:2-}{it:#},
where the sampling weight for the unselected PSUs are multiplied by {it:#}.
{cmd:fay(0)} is the default, and is equivalent to the original BRR method.
{pmore}
{it:#} must be a number between 0 and 2; however, {cmd:fay(1)} is not allowed.
{phang}
{opt strata(varname)} ({cmd:brr} and {cmd:jackknife} only) specifies the name of
a variable (numeric or string) that contains stratum identifiers.
{opt strata()} is required by {cmd:brr}.
{phang}
{opt psu(varname)} ({cmd:brr} and {cmd:jackknife} only) specifies the name of a
variable (numeric or string) that contains identifiers for the primary
sampling units (clusters).
{phang}
{opt fpc(varname)} ({cmd:brr} and {cmd:jackknife} only) specifies the name of a
numeric variable that contains finite population corrections for the variance
estimates.
{phang}
{opt poststrata(varlist)} specifies the name of variables (numeric or string)
that identify the post stratum groups.
{phang}
{opt postweight(varname)} specifies the name of a numeric variable
that contains the post stratum counts in the population.
{phang}
{opt nocheck} prevents {cmd:svygen} {cmd:poststratify} from checking the
validity of the posts stratum counts. This option helps speed things up when
{cmd:svygen} is called within a loop, but it should only be used once the
counts have been validated.
{title:Examples}
{phang}
{cmd:. svygen jackknife brrw [pw=sampwgt], H(h12) strata(strid) psu(psuid)}
{p_end}
{phang}
{cmd:. svygen jackknife f jkw [pw=sampwgt], strata(strid) psu(psuid)}
{p_end}
{phang}
{cmd:. svygen post pwgt [pw=sampwgt], posts(strid postid) postw(totals)}
{p_end}
{title:Also see}
{psee}
Online:
{helpb svy},
{helpb svyset}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -