clm2twoAC(sensR)
clm2twoAC()所属R语言包:sensR
Extract 2-AC coefficient table from a cumulative link model
从累积的链路模型提取2-AC系数表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The Thurstonian model for the 2-AC protocol can be formulated as a cumulative link model (see the references). This function extracts the 2-AC model parameter estimates, standard errors, z-value and p-values from a cumulative link (mixed) model fitted with clm or clmm from package ordinal.
可以配制为2-AC协议Thurstonian模型作为累积链路模型(参见参考文献)。此功能提取2-AC模型的参数估计值,标准差,从链路累积模型(混合)配有从包装clm的clmm或ordinalz值和p值。
用法----------Usage----------
clm2twoAC(object, ...)
参数----------Arguments----------
参数:object
a clm or clmm object
clm或clmm对象
参数:...
not currently used.
当前未使用。
值----------Value----------
A data.frame with the coefficient table. The two first rows contain the estimates of tau and d.prime while the remaining rows contain optional regression variables for d.prime.
Adata.frame的系数表。两个第一行包含的估计tau和d.prime,而剩余的行包含可选的回归变量为d.prime。
(作者)----------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----------
twoAC, twoACpwr
twoAC,twoACpwr
实例----------Examples----------
## Example of a simple 2-AC model. First the conventional way:[#示例一个简单的2-AC模式。首先,传统的方式:]
twoAC(c(2, 2, 6))
## The using a cumulative link model (clm from package ordinal): [#使用链路累积模型(CLM从包装序):]
library(ordinal)
response <- gl(3,1)
fit.clm <- clm(response ~ 1, weights = c(2, 2, 6), link = "probit")
clm2twoAC(fit.clm)
## Alternatively we could get estimates and standard errors "by hand":[#另外,我们可以得到的估计和标准错误“手”:]
tab <- coef(summary(fit.clm))
theta <- tab[,1]
(tau <- (theta[2] - theta[1])/sqrt(2))
(d.prime <- (-theta[2] - theta[1])/sqrt(2))
VCOV <- vcov(fit.clm)
(se.tau <- sqrt((VCOV[1,1] + VCOV[2,2] - 2*VCOV[2,1])/2))
(se.d.prime <- sqrt((VCOV[1,1] + VCOV[2,2] + 2*VCOV[2,1])/2))
## Extended example with a regression model for d.prime[#与的回归模型d.prime的扩展的例子]
## (see the referenced paper for details):[#(见引用的文件的详细信息):]
n.women <- c(2, 2, 6)*10
n.men <- c(1, 2, 7)*10
wt <- c(n.women, n.men)
response <- gl(3,1, length = 6)
gender <- gl(2, 3, labels = c("women", "men"))
fm2 <- clm(response ~ gender, weights = wt, link = "probit")
clm2twoAC(fm2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|