dprime_test | R Documentation |
This function tests the hypothesis that the common d-prime is equal to or greater/less than a certain value, e.g. zero in a Wald or likelihood root test.
dprime_test(correct, total, protocol, conf.level = 0.95, dprime0 = 0,
statistic = c("likelihood", "Wald"),
alternative = c("difference", "similarity", "two.sided", "less", "greater"),
estim = c("ML", "weighted.avg"))
correct |
a numeric vector of the number of correct answers; one element for each test. |
total |
a numeric vector of the total number of trials; one element for each test. |
protocol |
a character vector or factor naming the protocol used; one element
for each test. Currently the following protocols are supported:
|
conf.level |
the confidence level for the confidence interval of the estimated common d-prime. |
dprime0 |
Value of d-prime under the Null hypothesis. Non-negative numeric scalar. |
statistic |
the test statistic for computing the confidence interval as well as p-value. |
alternative |
the direction of the hypothesis test. |
estim |
The estimation method for the common d-prime. |
The vectors correct
, total
and protocol
have to
be of the same length.
The function has a print method.
an object of class "dprime_test"
with the following elements
p.value |
the p-value for the 'any-differences' test. |
alternative |
character naming the direction of the hypothesis test. |
statistic |
the name of the test statistic. |
data |
the data table produced by |
conf.level |
confidence level for the common d-prime. |
conf.int |
the confidence interval for the common d-prime. |
estim |
the estimation method for the common d-prime. |
conf.method |
the statistical method/test statistic used to compute the confidence interval for the common d-prime. |
Rune Haubo B Christensen
dprime_compare
, dprime_table
,
posthoc.dprime_compare
.
n <- rep(40, 4)
x <- c(25, 25, 30, 35)
protocol <- c("triangle", "duotrio", "threeAFC", "twoAFC")
## Look at the data table with d-primes etc.:
dprime_table(x, n, protocol)
## Test of common d':
dprime_test(x, n, protocol)
## Another setting:
dprime_test(x, n, protocol, dprime0=2, statistic="Wald",
alternative="less", estim="weighted.avg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.