randomSlippage(SoDA)
randomSlippage()所属R语言包:SoDA
Are simulated sequences robust?
是模拟序列强劲吗?
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function inserts a specified number of extra random uniforms into a sequence of calls to a generator, and checks whether the subsequent samples re-synchronize.
此功能将指定数量的额外随机制服的顺序调用一台发电机,并检查是否在随后的样品重新同步。
用法----------Usage----------
randomSlippage(nRuns, expr1, expr2, slip = runif(1), check = FALSE)
参数----------Arguments----------
参数:nRuns
Number of runs for the comparison.
的运行次数进行比较。
参数:expr1, expr2
The literal expressions to be evaluated before and after the possible slippage.
前,后可能出现延误的文字表达式来进行评估。
参数:slip
The expression to be evaluated to cause the slippage; default runif(1).
的表达进行评估,导致延误,默认runif(1)。
参数:check
If TRUE, the function will check that synchronization really did occur.
如果TRUE,该函数将检查同步真的发生了。
Details
详细信息----------Details----------
The second generated result from evaluatging expr2 will resynchronize, if ever, after some number of values generated in the original and perturbed sequence, say k1 and k2. At this point, each sequence returns exactly the same value because each has used the same number of uniforms; from that point on the sequences will be identical.
从evaluatgingexpr2将重新同步,如果有的话,后在原有的价值观产生一定数量的扰动序列生成的第二个结果,说k1和k2。在这一点上,每个序列返回完全相同的值,因为每个使用相同数目的制服,从该点上的序列将是相同的。
Re-synchronization need never occur; see the example in the reference.
重新同步需要永远不会发生在参考的例子。
值----------Value----------
The function returns a matrix with nRuns rows and two columns. For each row, the returned value is the slippages, c(k1, k2) in the Details.
该函数返回一个nRuns行两列的矩阵。对于每一行,返回值是延误,c(k1, k2)的详细信息。
实例----------Examples----------
set.seed(211)
RNGkind("default", "Ahrens")
xx = randomSlippage(1000, rnorm(20), rnorm(20))
table(xx[,1], xx[,2])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|