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

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

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

                                         Attribution of new labels to atomic strata on the basis of the optimised strata aggregation
                                         新标签的基础上优化地层聚集原子地层中的归因

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

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

Once optimal stratification has been obtained ('outstrata') it is important to attribute  new strata labels to each atomic stratum. By executing this function, a new dataframe "newstrata" will be obtained with the same structure of the old,  ("strata") but with the addition of a new stratum label. By indicating "YES" to "writeFile" parameter, the dataframe "newstrata" will be outputted in a delimited file ("newstrata.txt"). Also a second delimited file ("strata_aggregation.txt") will be outputted, containing relations bewteen atomic and aggregated strata.
一旦已获得最佳的分层(outstrata)是很重要的新的地层标签归因每个原子层。通过执行该功能时,一个新的数据框“newstrata”将以下方式获得具有相同的结构的旧(“层”),但与添加一个新的层标签。通过表明“YES”到参数“WRITEFILE”,数据框的“newstrata”将带分隔符的文件输出(的“newstrata.txt”)。第二个分隔的文件(“strata_aggregation.txt”),将输出包含原子和聚合关系等四大阶层。


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


updateStrata(strata, writeFile = "YES")



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

参数:strata
This is the (mandatory) dataframe containing the information related to the atomic strata to which the  optimisation has been applied to.   
这是包含的信息相关的优化已被应用到的原子的地层(强制)数据框。


参数: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 the strata
一个数据框的地层


(作者)----------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")
# updating sampling strata with new strata labels[更新采样地层的新的阶层标签]
newstrata <- updateStrata(strata)
#[]
# 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")
# updating sampling strata with new strata labels[更新采样地层的新的阶层标签]
newstrata <- updateStrata(swissstrata)

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 06:32 , Processed in 0.026505 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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