brrweights(survey)
brrweights()所属R语言包:survey
Compute replicate weights
计算复制权重
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute replicate weights from a survey design. These functions are usually called from as.svrepdesign rather than directly by the user.
复制的权重计算的一项调查设计。这些功能通常被称为as.svrepdesign,而不是直接由用户。
用法----------Usage----------
brrweights(strata, psu, match = NULL,
small = c("fail","split","merge"),
large = c("split", "merge", "fail"),
fay.rho=0, only.weights=FALSE,
compress=TRUE, hadamard.matrix=NULL)
jk1weights(psu,fpc=NULL,
fpctype=c("population","fraction","correction"),
compress=TRUE)
jknweights(strata,psu, fpc=NULL,
fpctype=c("population","fraction","correction"),
compress=TRUE,
lonely.psu=getOption("survey.lonely.psu"))
参数----------Arguments----------
参数:strata
Stratum identifiers
地层标识符
参数:psu
PSU (cluster) identifier
PSU(聚类)的标识符
参数:match
Optional variable to use in matching.
可选变量来使用的匹配。
参数:small
How to handle strata with only one PSU
如何处理各阶层,只有一个电源供应器
参数:large
How to handle strata with more than two PSUs
如何处理各阶层有两个以上的PSU
参数:fpc
Optional population (stratum) size or finite population correction
可选的人群(阶层)的大小或有限总体修正
参数:fpctype
How fpc is coded.
如何fpc编码。
参数:fay.rho
Parameter for Fay's extended BRR method
Fay的扩展BRR方法的参数
参数:only.weights
If TRUE return only the matrix of replicate weights
如果TRUE只返回复制的权重矩阵
参数:compress
If TRUE, store the replicate weights in compressed form
如果TRUE,储存以压缩形式的复制权
参数:hadamard.matrix
Optional user-supplied Hadamard matrix for brrweights
可选的用户提供Hadamard矩阵为brrweights
参数:lonely.psu
Handling of non-certainty single-PSU strata
处理非确定性单PSU阶层的
Details
详细信息----------Details----------
JK1 and JKn are jackknife schemes for unstratified and stratified designs respectively. The finite population correction may be specified as a single number, a vector with one entry per stratum, or a vector with one entry per observation (constant within strata). When fpc is a vector with one entry per stratum it may not have names that differ from the stratum identifiers (it may have no names, in which case it must be in the same order as unique(strata)). To specify population stratum sizes use fpctype="population", to specify sampling fractions use fpctype="fraction" and to specify the correction directly use fpctype="correction"
JK1和JKN是不分层,分层设计的折刀计划。有限总体修正可能被指定为一个数字,一个向量,其每一个条目阶层,或者一个向量,其每一个条目观察(恒定在地层)。当fpc是一个向量,其每一个条目地层中,它可能没有名称不同于地层标识符的(它可能没有名字,在这种情况下,它必须是在相同的顺序unique(strata))。要指定人口阶层的尺寸使用fpctype="population",指定抽样比使用fpctype="fraction"指定校正直接使用fpctype="correction"
The only reason not to use compress=TRUE is that it is new and there is a greater possibility of bugs. It reduces the number of rows of the replicate weights matrix from the number of observations to the number of PSUs.
唯一的不使用compress=TRUE的原因是,它是新的,有一个更大的错误的可能性。行的复制权重矩阵的若干意见的PSU的数量大大减少了。
In BRR variance estimation each stratum is split in two to give half-samples. Balanced replicated weights are needed, where observations in two different strata end up in the same half stratum as often as in different half-strata.BRR, strictly speaking, is defined only when each stratum has exactly two PSUs. A stratum with one PSU can be merged with another such stratum, or can be split to appear in both half samples with half weight. The latter approach is appropriate for a PSU that was deterministically sampled.
BRR方差估计各阶层被分为两,给半样本。平衡需要复制的权重,其中在两个不同阶层的观测最终在同一半分层尽可能经常在strata.BRR不同的半,严格地说,只有当被定义每个层具有恰好两个PSU。与一个PSU层数可以与另一个这样的阶层合并,或可以被分割以出现在两个半样品的一半重量。后一种方法是适合的电源供应器,确定的采样。
A stratum with more than two PSUs can be split into multiple smaller strata each with two PSUs or the PSUs can be merged to give two superclusters within the stratum.
层数两个以上的事业单位,可以分割成多个更小的阶层,每两个电源或合并的事业单位可以给两个超星系团内的地层。
When merging small strata or grouping PSUs in large strata the match variable is used to sort PSUs before merging, to give approximate matching on this variable.
当合并小层或分组事业单位,在大型地层match变量是用来排序的事业单位合并前,给这个变量的近似匹配。
If you want more control than this you should probably construct your own weights using the Hadamard matrices produced by hadamard
如果你想更多的控制权,你应该构建自己的重量,使用Hadamard矩阵产生的hadamard
值----------Value----------
For brrweights with only.weights=FALSE a list with elements
对于brrweightsonly.weights=FALSE的列表元素
参数:weights
two-column matrix indicating the weight for each half-stratum in one particular set of split samples
两列的矩阵表示权重,每半层在一组特定的分割样本
参数:wstrata
New stratum variable incorporating merged or split strata
新的社会阶层变量纳入合并或分割的阶层
参数:strata
Original strata for distinct PSUs
针对不同的事业单位的原始地层
参数:psu
Distinct PSUs
独特的电源模块
参数:npairs
Dimension of Hadamard matrix used in BRR construction
用于在BRR建设中的尺寸Hadamard矩阵
参数:sampler
function returning replicate weights
函数返回复制的权重
参数:compress
Indicates whether the sampler returns per PSU or per observation weights
表示是否安装了sampler回报率PSU或每次观测的权重
For jk1weights and jknweights a data frame of replicate weights and the scale and rscale arguments to svrVar.
对于jk1weights和jknweights一个数据框的权重和scale和rscale参数svrVar的复制。
参考文献----------References----------
参见----------See Also----------
hadamard, as.svrepdesign,
hadamard,as.svrepdesign,
实例----------Examples----------
data(scd)
scdnofpc
nest=TRUE)
## convert to BRR replicate weights[#转换为BRR复制的权重]
scd2brr
svymean(~alive, scd2brr)
svyratio(~alive, ~arrests, scd2brr)
## with user-supplied hadamard matrix[#用户提供Hadamard矩阵]
scd2brr1
svymean(~alive, scd2brr1)
svyratio(~alive, ~arrests, scd2brr1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。