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

R语言 sperrorest包 resample.strat.uniform()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 15:04:34 | 显示全部楼层 |阅读模式
resample.strat.uniform(sperrorest)
resample.strat.uniform()所属R语言包:sperrorest

                                        Draw stratified random sample
                                         绘制分层随机抽样

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

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

resample.strat.uniform draws a stratified random sample (with or without replacement) from the samples in data. Stratification is over the levels of data[,param$response]. The same number of samples is drawn within each level.
resample.strat.uniform吸引了分层随机抽样(或更换)从样本中data。分层的data[,param$response]以上的水平。相同数量的样品被吸入内每个级别。


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


  resample.strat.uniform(data,
    param = list(strat = "class", nstrat = Inf, replace = FALSE))



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

参数:data
a data.frame, rows represent samples
data.frame,行代表样本


参数:param
a list with the following components: strat is either the name of a factor variable in data that defines the stratification levels, or a vector of type factor and length nrow(data); n is a numeric value specifying the size of the subsample; replace determines if sampling is with or without replacement
与以下组件:strat可以是一个因素变量的名称data,它定义了分层的水平,或类型的因子的向量和长度nrow(data);n列表是一个数值,指定的子样本的大小,“replace确定取样是有或没有更换


Details

详细信息----------Details----------

If param$replace=FALSE, a subsample of size min(param$n,nrow(data)) will be drawn from data. If param$replace=TRUE, the size of the subsample is param$n.
如果param$replace=FALSE,其中一个样本的大小min(param$n,nrow(data))将来自data。如果param$replace=TRUE,子样本的大小是param$n。


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

a data.frame containing a subset of the rows of data.
data.frame包含的一个子集的行data。


参见----------See Also----------

resample.uniform, sample
resample.uniform,sample


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


data(ecuador) # Muenchow et al. (2012), see ?ecuador[明肖等。 (2012年),厄瓜多尔,看到了吗?]
d = resample.strat.uniform(ecuador, param = list(strat = "slides", nstrat = 100))
nrow(d) # == 200[== 200]
sum(d$slides == "TRUE") # == 100[== 100]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 20:17 , Processed in 0.029643 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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