dVsim: Simulation based density for visual inference

Description Usage Arguments Value Examples

View source: R/pvalues-deprecated.r

Description

\lifecycle

deprecated Probablity of observing exactly x picks of the data plot in K evaluations of a lineup of size m. We distinguish between three different scenarios:

Usage

1
dVsim(x, K, m = 20, N = 10000, scenario = 3, xp = 1, target = 1)

Arguments

x

number of observed picks of the data plot

K

number of evaluations of the same lineup

m

size of the lineup

N

MC parameter: number of replicates on which MC probabilities are based. Higher number of replicates will decrease MC variability.

scenario

numeric value, one of 1, 2, or 3, indicating the type of simulation used: scenario 3 assumes that the same lineup is shown in all K evaluations

xp

exponent used, defaults to 1

target

location of target plot(s). By default 1. If several targets are present, specify vector of target locations.

Value

simulation based density to observe x picks of the data plot in K evaluation under the assumption that the data plot is consistent with the null hypothesis. For comparison a p value based on a binomial distribution is provided as well.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
dVsim(2, 20, m=3) # triangle test

## points in red are binomial distribution, black points are for inference
## in lineups using scenario 3
require(ggplot2)
qplot(x=x, y=scenario3, data=dVsim(0:6,6,m=2)) +
   geom_point(aes(x,y=binom), colour="red") + ylim(c(0,0.5))
qplot(x=x, y=scenario3, data=dVsim(0:6,6,m=3)) +
   geom_point(aes(x,y=binom), colour="red") + ylim(c(0,0.5))

## End(Not run)

# lineup with two targets: what are the probabilities to identify at least
# one of the targets?
dVsim(0:5, K=5, m=20, N=10000, scenario=3, target=1:2)
# slight difference between this distribution and the distribution for a
# lineup of size 10 with a single target:
dVsim(0:5, K=5, m=10, N=10000, scenario=3, target=1)

heike/vinference documentation built on Oct. 17, 2020, 7:08 a.m.