fpConditionCheck {fixedpointproperty}R Documentation

Checks preconditions before performing fpANOVA

Description

This function checks whether two conditions are met before performing fpANOVA.

Usage

fpConditionCheck(object)

Arguments

object

a list of objects from class fpp.

Details

Finding support for the fixed-point property will be mute if there is no significant difference between experimental conditions. Whether all conditions differ can be tested using fpConditionCheck1, which performs pairwise t-tests. A warning is provided if at least one paire of conditions does not significantly differ (default settings of pairwise.t.test are used).

Finding support for the fixed-point property is difficult if the bandwidth of the density estimation is chosen too small. In that case, multiple crossing points of pairs of densities will preclude a precise estimate of the fixed point. fpConditionCheck2 tests the number of crossing points for each pair of conditions, and provides a warning if more crossing points are detected.

Value

No return value, called for warnings generated by fpConditionCheck1 and fpConditionCheck2

Author(s)

Leendert van Maanen (l.vanmaanen@uu.nl)

References

Van Maanen, L., De Jong, R., Van Rijn, H (2014). How to assess the existence of competing strategies in cognitive tasks: A primer on the fixed-point property. PLOS One, 9, e106113

Van Maanen, L. Couto, J. & Lebetron, M. (2016). Three boundary conditions for computing the fixed-point property in binary mixture data. PLOS One, 11, e0167377.

See Also

fpAnova, pairwise.t.test

Examples

N <- 200  # nr of observations per condition
M <- 50  # nr of participants
p <- seq(0.1, 0.9, 0.4)  # mixture proportions
means <- c(0.3, 0.3)  # means of base distributions are equal, yielding a warning if check=TRUE
sigma <- 5  # scale of base distributions

bw <- 0.01 
# kernel bandwidth of the density estimation. Too small values yield a warning if check=TRUE

### generate data
rt <- NULL
for (i in 1:length(p)) {
    rt <- c(rt, ifelse(sample(0:1, N * M, replace = TRUE, prob = c(p[i], 1 - p[i])), 
        rnorm(N * M, means[1], sigma), rnorm(N * M, means[2], sigma)))
}
rt <- rt + rep(rnorm(M, sd = 0.1), times = N)  # normally distributed pp random effect
dat <- data.frame(rt = rt, cond = rep(1:length(p), each = N * M), pp = rep(1:M, 
    each = N))

### compute crossing points
res <- tapply(1:nrow(dat), dat$pp, function(X) {
    fpGet(dat[X, ], 1000, bw = bw)
})  

### test fixed point
fpAnova(res, stat = "both", check=TRUE) # this provides both warnings


[Package fixedpointproperty version 1.0 Index]