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

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

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

                                         Best stratification of a sampling frame for multipurpose surveys
                                         分层抽样框,为多用途调查

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

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

This function runs a set of other functions to optimise the stratification of a sampling frame
此功能的其他功能,以优化运行一组分层抽样框


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


        optimizeStrata(
        errors ,
        strata ,
        cens = NULL,
        strcens = FALSE,
        alldomains = TRUE,
        dom = NULL,       
        initialStrata = 3000,
        addStrataFactor = 0.01,
        minnumstr = 2,
        iter = 20,
        pops = 20,
        mut_chance = 0.05,
        elitism_rate = 0.2,
        highvalue = 1e+08,
        suggestions = NULL,
        realAllocation = FALSE,
        writeFile = "YES"
        )



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

参数:errors
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   
这是(强制)数据框的精度水平的变异系数表示,估计目标变量Y的调查必须符合


参数:strata
This is the (mandatory) dataframe containing the information related to "atomic" strata, i.e. the strata obtained by  the Cartesian product of all auxiliary variables X's. Information concerns the identifiability of strata (values of X's) and variability of Y's (for each Y, mean and standard error in strata)   
这是(强制性的)数据框,其中包含的信息相关的“原子”阶层,即得到的笛卡尔积的所有辅助变量X的地层。信息涉及可识别地层(X的值)和变异的Y(每Y,均值和标准差的地层)


参数:cens
This the (optional) dataframe containing the takeall strata, those strata whose units must be selected in  whatever sample. It has same structure than "strata" dataframe  
这是(可选)数据框包含takeall的阶层,这些阶层在什么样的单位,必须选择。它具有相同的结构比“阶层”数据框


参数:strcens
Flag (TRUE/FALSE) to indicate if takeall strata do exist or not. Default is FALSE  
标志(TRUE / FALSE)来表示如果takeall阶层不存在或不。默认是false。


参数:alldomains
Flag (TRUE/FALSE) to indicate if the optimization must be carried out on all domains (default is TRUE). If it is set to FALSE, then a value must be given to parameter 'dom'  
标志(TRUE / FALSE),以表示对所有的域(默认为true)如果必须进行优化。如果它被设置为FALSE,则值必须为参数“DOM”


参数:dom
Indicates the domain on which the optimization must be carried. It is an integer value that has to be internal to the interval  (1 <&ndash;> number of domains). If 'alldomains' is set to TRUE, it is ignored  
指示域必须进行优化。它是一个整数的值,该值必须是内部的时间间隔(1 < - >数量的域)。如果alldomains“设置为TRUE,它将被忽略


参数:initialStrata
This is the initial limit on the number of strata for each solution. Default is 3000  
这是最初的限制为每个解决方案的数目的地层。默认为3000。


参数:addStrataFactor
This parameter indicates the probability that at each mutation the number of strata may increase with  respect to the current value. Default is 0.01 (1  
该参数表示的概率,在每个突变可能增加的电流值相对于地层的数目。默认值是0.01(1


参数:minnumstr
Indicates the minimum number of units that must be allocated in each stratum. Default is 2  
表示的单位,必须在各阶层分配的最小数量。默认值是2


参数:iter
Indicated the maximum number of iterations (= generations) of the genetic algorithm. Default is 20  
表示(=代)的遗传算法的最大迭代次数。默认值是20


参数:pops
The dimension of each generations in terms of individuals. Default is 50  
在个人方面的每一个世代的尺寸。默认值是50


参数:mut_chance
Mutation chance: for each new individual, the probability to change each single chromosome, i.e. one bit of the solution vector. High values of this parameter allow a deeper exploration of the solution space, but a slower convergence, while low values permit a faster convergence, but the final solution can be distant from the optimal one. Default is 0.05   
的突变机会:每一个新的个体,每个单条染色体,即一个比特的解向量的概率改变。此参数值高允许更深的解空间的勘探,但较慢的收敛,而较低的值允许更快的收敛,但最终的解决方案可以是从最佳的一个遥远的。默认值是0.05


参数:elitism_rate
This  parameter indicates the rate of better solutions that must be preserved from one generation to another. Default is 0.2 (20  
该参数表示更好的解决方案,必须保留从一代到另一代的速度。默认值是0.2(20


参数:highvalue
Parameter for genetic algorithm. Not to be changed  
遗传算法的参数。不被改变


参数:suggestions
Optional parameter for genetic algorithm that indicates one possible solution  (maybe from previous runs) that will be introduced in the initial population.  Default is NULL.  
遗传算法,指出一个可能的解决方案(也许是从以前运行),将推出在初始人口的可选参数。默认值是NULL。


参数:realAllocation
If FALSE, the allocation is based on INTEGER values; if TRUE, the allocation is based on REAL values   
如果为FALSE,分配是基于整数的值,如果为true,分配是基于REAL值


参数:writeFile
Indicates if at the end of the processing the resulting strata will be outputted in a delimited file. Default is "YES".  
表示如果在处理结束,将输出在产生的地层带分隔符的文件。默认值是“YES”。


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

A dataframe containing strata
一个数据框阶层


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



Giulio Barcaroli




参考文献----------References----------

sampling frames in a multivariate  and multidomain sample design', Contributi Istat n.10/2008,   http://www.istat.it/dati/pubbsci/contributi/contributi2008.html

实例----------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,
        alldomains = TRUE,
        dom = NULL,
        initialStrata = nrow(strata)/3,
        addStrataFactor = 0.01,
        minnumstr = 2,
        iter = 100,
        pops = 20,
        mut_chance = 0.05,
        elitism_rate = 0.2,
        highvalue = 100000000,
        suggestions = NULL,
        realAllocation = TRUE,
        writeFile = "YES")
sum(ceiling(outstrata$SOLUZ))
head(outstrata)
#[]
# The following example is realistic, but is time consuming as it implies 7 different domains[下面的例子是现实的,但非常耗时,因为它意味着7个不同的领域]
#        it can be run by indicating a single domain (for instance = 7)[它可以运行表示一个单一的领域(例如= 7)]
## Not run: [#不运行:]
library(SamplingStrata)
data(swisserrors)
data(swissstrata)
outstrata <- optimizeStrata (
        errors = swisserrors,
        strata = swissstrata,
        cens = NULL,
        strcens = FALSE,
        alldomains = TRUE,
        dom = NULL,
        initialStrata = nrow(strata)/3,
        addStrataFactor = 0.01,
        minnumstr = 2,
        iter = 100,
        pops = 20,
        mut_chance = 0.05,
        elitism_rate = 0.2,
        highvalue = 100000000,
        suggestions = NULL,
        realAllocation = TRUE,
        writeFile = "YES")
sum(ceiling(outstrata$SOLUZ))
head(outstrata)

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

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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