wald: Run Wald tests of separability and independence

Description Usage Arguments Value References Examples

View source: R/wald.grt_wind_fit.R

Description

Run Wald tests of perceptual separability, decisional separability, and perceptual independence (see appendix of Soto et al., 2015), using the maximum likelihood parameter estimates stored in a grt_wind_fit object.

Usage

1
wald(fitted_model, cmats, estimate_hess=T)

Arguments

fitted_model

An object returned by grt_wind_fit

cmats

List of confusion matrices. Each entry in the list should contain the 4x4 confusion matrix from one individual. For a detailed description of how to create this list, see grt_wind_fit

estimate_hess

Indicates whether a numerical estimate of the Hessian should be obtained. If an estimate has been previously obtained and is stored in fitted_model, setting estimate_hess=F will save computing time.

Value

An object of class "grt_wind_fit," including information about Wald tests.

The function summary is used to obtain a summary of the model fit to data and the results of Wald tests.

References

Soto, F. A., Musgrave, R., Vucovich, L., & Ashby, F. G. (2015). General recognition theory with individual differences: A new method for examining perceptual and decisional interactions with an application to face perception. Psychonomic Bulletin & Review, 22(1), 88-111.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Create list with confusion matrices # In this example, we enter data from
# an experiment with 5 participants. For each participant, inside the c(...),
# enter the data from row 1 in the matrix, then from row 2, etc.
cmats <- list(matrix(c(161,41,66,32,24,147,64,65,37,41,179,43,14,62,22,202),nrow=4,ncol=4,byrow=TRUE))
cmats[[2]] <- matrix(c(126,82,67,25,8,188,54,50,34,75,172,19,7,103,14,176),nrow=4,ncol=4,byrow=TRUE)
cmats[[3]] <- matrix(c(117,64,89,30,11,186,69,34,21,81,176,22,10,98,30,162),nrow=4,ncol=4,byrow=TRUE)
cmats[[4]] <- matrix(c(168,57,47,28,15,203,33,49,58,54,156,32,9,96,9,186),nrow=4,ncol=4,byrow=TRUE)
cmats[[5]] <- matrix(c(169,53,53,25,34,168,69,29,38,48,180,34,19,44,60,177),nrow=4,ncol=4,byrow=TRUE)

# fit the model to data
fitted_model <- grt_wind_fit(cmats)

#' # run the wald tests
fitted_model <- wald(fitted_model, cmats)

# see the results
summary(fitted_model)

fsotoc/grtools documentation built on Nov. 15, 2020, 5:14 a.m.