dprime_test: Test of simple hypothesis with the common d-prime

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/d.primeTest.R

Description

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.

Usage

1
2
3
4
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"))

Arguments

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: "triangle", "duotrio", "threeAFC", "twoAFC", "tetrad".

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. "difference" and "similarity" are just alternative ways of specifying "greater" and "less" respectively.

estim

The estimation method for the common d-prime.

Details

The vectors correct, total and protocol have to be of the same length.

The function has a print method.

Value

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 dprime_table.

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.

Author(s)

Rune Haubo B Christensen

See Also

dprime_compare, dprime_table, posthoc.dprime_compare.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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")

sensR documentation built on May 2, 2019, 9:43 a.m.