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

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

[复制链接]
发表于 2012-9-30 01:08:56 | 显示全部楼层 |阅读模式
twoACpwr(sensR)
twoACpwr()所属R语言包:sensR

                                        Exact Power Computation for the 2-AC Discrimination Protocol
                                         精确的功率计算的2-AC歧视的协议

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

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

Computes the exact power for the 2-AC protocol using the (signed) likelihood root statistic. Power is computed for a significance test of d-prime. The tol argument specifies the precision with which power should be computed.
使用(签名)的可能性根统计,计算精确的功率为2-AC协议。计算电源的D-黄金的显着性检验。 tol参数指定的精度与功率计算。


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



twoACpwr(tau, d.prime, size, d.prime0 = 0, alpha = 0.05, tol = 1e-5,
         return.dist = FALSE, statistic = "likelihood",
         alternative = c("two.sided", "less", "greater"))




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

参数:tau
the value of tau under the alternative hypothesis
头下的另一种假设的价值


参数:d.prime
the value of d.prime under the alternative hypothesis
备择假设下的价值d.prime


参数:size
the sample size
样本大小


参数:d.prime0
the value of d-prime under the null hypothesis in the significance test for which power should be computed
D-黄金的价值在权力应计算的显着性检验的零假设下


参数:alpha
the size of the test
的大小的测试


参数:tol
specifies the precision with which power should be computed, e.g., 1e-4 cause power to be computed correctly to three significant digits. Lower values of tau gives higher precision, but also longer computation times.
指定应该计算精度与功率,例如,1e-4因为权力正确计算三个数字。较低的值tau提出了更高的精度,而且计算时间较长。


参数:return.dist
should the p-value distribution be returned rather than the power be computed?
应被返回,而不是功率来计算p-值分布?


参数:statistic
the statistic used in the significance test for which the power should be computed. Currently only the (signed) likelihood root statistic is available—se the details for more information.
的统计显着性检验中使用的电源应计算。目前只有(签名)的可能性根统计是可供本身的详细信息,更多信息。


参数:alternative
the type of alternative hypothesis in the significance test for which the power should be computed
电源应计算在显着性检验的类型,备择假设


Details

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

The main idea in this function is to compute all possible data outcomes and then compute the p-value for the chosen significance test for each of these outcomes. This gives the exact distribution of p-values from which the exact power can be computed. This is basically what happens if tol = 0.
在这个函数中的主要思想是计算所有可能的数据结果,然后计算这些成果所选择的显着性检验的p值。这给出确切的p-值的分布是从可以计算的精确功率。这基本上是发生什么,如果tol = 0。

There is, however, a problem with this approach if size is large, since the the number of possible outcomes increases very fast with the size; the order is O(n^2). The solution to this problem is to ignore those outcomes which will occur with very small probability. Often, a large proportion of the outcomes, say 90% will occur so rarely that they account for, say 1e-4 percent of the probability mass; it is therefore safe to ignore those outcomes without compromising the accuracy of the computed power by any relevant amount. For more information see the referenced paper and the package vignette Statistical Methodology.
有,然而,这种方法如果size是大的问题,因为可能出现的结果的数量增加速度非常快,size;的顺序是O(n^2)。这个问题的解决办法是忽略这些成果将发生的概率非常小。通常情况下,大比例的结果,说90%,所以很少发生,他们占了,说1e-4%的概率质量,因此,它是安全的忽视,这些成果没有影响的准确性,计算出来的功率任何有关款项。欲了解更多信息,请参阅所引用的文件和包小插曲统计方法。

The Wald statistic is not available here. The reason is that the Wald statistic is not always defined and the problem is therefore what to do with those cases where it is not defined? On the other hand the likelihood root statistic is defined in all cases, so theres is no problem here, and since the likelihood root statistic is more accurate than the Wald statistic, there is not much reason to use the Wald statistic after all.
这里没有Wald统计量。原因是,Wald统计量并不总是定义,因此,问题是做什么用的情况下,它是没有定义的?另一方面的可能性根统计数字是指在任何情况下,你说有没有问题,在这里,和的可能性根比Wald统计量的统计更准确,使用Wald统计量毕竟没有太多的理由。

For the record; the Wald statistic is not defined, when the standard error of d-prime is not defined. This happens when the variance-covariance matrix of tau and d-prime is not defined, which occurs in a number of boundary cases, i.e., when one or more cells contain zero frequencies. Since these outcomes occur with positive probability, the algorithm used by twoACpwr will always encounter those cases and have to deal with them. This would be cumbersome to implement.
为了记录在案,Wald统计量没有定义,没有定义的标准误差D-黄金。这种情况发生时,方差 - 协方差矩阵的tau和d-素数没有被定义,这是发生在当一个或多个单元格中包含的边界的情况下,即,一些非零频率。由于这些结果的发生概率为正,该算法使用twoACpwr总是会遇到这些情况,来对付他们。这将是实现起来非常麻烦。


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

A data.frame with one line and the following entries <table summary="R valueblock"> <tr valign="top"><td>power</td> <td> the computed power</td></tr> <tr valign="top"><td>actual.alpha</td> <td> the actual size of the test (different from the nominal alpha given as argument due to the discreteness of the observations). </td></tr> <tr valign="top"><td>samples</td> <td> the number of possible outcomes for this size</td></tr> <tr valign="top"><td>discarded</td> <td> the number of outcomes for which the p-value is not computed. This number is zero if tol = 0</td></tr> <tr valign="top"><td>kept</td> <td> the number of outcomes for which the p-value is computed in. This number equals samples if tol = 0</td></tr> <tr valign="top"><td>p</td> <td> the probability vector of the multinomial distribution implied by the values of tau and d.prime.</td></tr> </table>
一条线,下列项目<table summary="R valueblock"> <tr valign="top"> <TD>data.frame </ TD> <TD>的计算功率</ Apower TD> </ TR> <tr valign="top"> <TD> actual.alpha</ TD> <TD>的实际大小不同的名义阿尔法测试(作为参数的离散性意见)。 </ TD> </ TR> <tr valign="top"> <TD> samples</ TD> <TD>的可能结果的数量来size</ TD> </ TR > <tr valign="top"> <TD>discarded</ TD> <TD>数的p-值是不计算的结果。这个数字是零如果tol = 0 </ TD> </ TR> <tr valign="top"> <TD>kept </ TD> <TD>成果的数量,在p值的计算英寸这个数字等于samples如果tol = 0 </ TD> </ TR> <tr valign="top"> <TD>p</ TD> <TD>概率向量的多项分布所隐含的价值tau和d.prime。</ TD> </ TR> </表>


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


Rune Haubo B Christensen



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

Christensen R.H.B., Lee H-S and Brockhoff P.B. (2011). Estimation of the Thurstonian model for the 2-AC protocol. Submitted to Food Quality and Preference.

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

clm2twoAC, twoACpwr
clm2twoAC,twoACpwr


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



## Exact power: [#精确功率:]
twoACpwr(tau = .5, d.prime = .7, size = 50, tol = 0)

## Power exact to a reasonable number of digits[#功率确切的合理数量的数字]
twoACpwr(tau = .5, d.prime = .7, size = 50, tol = 1e-5)

## Power for a similarity test in a discrimination setting where the[#电源的相似性测试的歧视设置]
## true parameter values are expected to be tau = 0.4 and true d.prime[#true参数值预计是tau蛋白= 0.4和真实d.prime的]
## = .5, while we want to show that d.prime &lt; 1, i.e., under the null[#= 0.5,而我们要表明d.prime,<1,即下空]
## hypothesis d.prime = 1:[#假设d.prime = 1:]
twoACpwr(tau = .4, d.prime = .5, size = 100, d.prime0 = 1, tol = 1e-5,
         alternative = "less")

## Power for a difference test in a preference setting where the true[在偏好设定真正的功率的差异测试]
## parameter values are expected to be tau = 0.4 and d.prime = -0.5,[#参数值预计将tau蛋白= 0.4和d.prime = -0.5,]
## while we want to show that d.prime is different from zero:[#而我们想,表明d.prime是不同的,从零:]
twoACpwr(tau = 0.4, d.prime = -0.5, size = 100, d.prime0 = 0, tol = 1e-5,
         alternative = "two.sided")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-20 00:30 , Processed in 0.032590 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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