找回密码
 注册
查看: 299|回复: 0

R语言 SamplingStrata包 verify()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 21:46:34 | 显示全部楼层 |阅读模式
verify(SamplingStrata)
verify()所属R语言包:SamplingStrata

                                         Analysis and control of stratification resulting by running optimizeStrata
                                         分析和分层导致的运行optimizeStrata的控制的

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Once stratification has been obtained ('outstrata') it is worth while to analyse the  distribution  of allocated units in resulting strata. This can be done by using function 'verify' to (1) visually inspect strata, (2) select (by left clicking) outlier strata, (3) edit selected strata (by rigth clicking and choosing 'stop' in the graph). Finally, it is possible to verify that sample allocation is compliant not only  with the subdomains that have been used to optimise stratification, but also  with all desired levels of possible domains. To do that, prepare a 'errors.chk.txt' that has the  same structure than that of 'errors' dataframe, with two differences: a) the last variable ('domainvalue') must not be present; b) add one row for the upper domain type (DOM1), while the second row is for DOM2 (that coincides with with the domains used for best stratification) and CV values of the latter are the corresponding maxima in dataframe 'errors'
一旦分层已获得(“outstrata),它是值得的,而分配的单位分布在产生的地层分析。这可以通过使用功能“验证”(1)目视检查各阶层,(2)选择(左击)离群地层,地层(分辩在图中单击并选择“停止”)(3)编辑。最后,它是可能的,以验证样本分配符合不仅与已被用于优化分层的子域,但也与所有可能的域的所需水平。要做到这一点,准备了“errors.chk.txt”的“错误”数据框具有相同的结构,但有两点不同:A)的最后一个变量(“domainvalue)必须不存在,B)添加一行为上层域类型(DOM1),而第二排是DOM2的(即与域用于最佳分层)和后者的CV值是相应的极大值在数据框“错误一致


用法----------Usage----------


verify(errors.chk, strata)



参数----------Arguments----------

参数:errors.chk
This is the (mandatory) dataframe containing the precision levels expressed in terms of Coefficients of Variation that estimates on target variables Y's of the survey must comply. It can coincide with dataframe 'errors' but does not contain variable 'domainvalue' and may contain two different domain levels (DOM1 and DOM2)  
这是(强制)数据框的精度水平的变异系数表示,估计目标变量Y的调查都必须遵守。它可以与数据框的“错误”,但不包含变量的domainvalue,并且可能包含两个不同的域级别(DOM1和DOM2)


参数:strata
This is the (mandatory) dataframe containing the information related to resulting strata output of optimizeStrata.  
这是(强制)数据框的相关信息导致地层的optimizeStrata输出。


值----------Value----------

A vector containing the sample allocation
一个向量,包含的样本分配


(作者)----------Author(s)----------



Giulio Barcaroli




实例----------Examples----------


#[]
# This is a toy example, and can be run[这是一个玩具的例子,并且可以运行]
#[]
library(SamplingStrata)
data(errors)
data(strata)
# optimisation of sampling strata[优化采样阶层的]
outstrata <- optimizeStrata (
    errors = errors,
    strata = strata,
    cens = NULL,
    strcens = FALSE,
    initialStrata = 3000,
    addStrataFactor = 0.01,   
    minnumstr = 2,
    iter = 30,
    pops = 20,
    mut_chance = 0.05,
    elitism_rate = 0.2,
    highvalue = 100000000,
    suggestions = NULL,
        writeFile = "YES")
head(outstrata)
#[]
# The following example is realistic, but is time consuming[下面的例子是现实的,但耗时]
#[]
## Not run: [#不运行:]
library(SamplingStrata)
data(swisserrors)
data(swissstrata)
# optimisation of sampling strata[优化采样阶层的]
outstrata <- optimizeStrata (
    errors = swisserrors,
    strata = swissstrata,
    cens = NULL,
    strcens = FALSE,
    initialStrata = 3000,
    addStrataFactor = 0.01,   
    minnumstr = 2,
    iter = 60,
    pops = 20,
    mut_chance = 0.05,
    elitism_rate = 0.2,
    highvalue = 100000000,
    suggestions = NULL,
        writeFile = "YES")
# analysis of results[分析结果]
data(swisserrors.chk)
verify(swisserrors.chk,outstrata)

## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-29 04:53 , Processed in 0.038530 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表