Create Discrimination Probabilities (Psi) from Data Frame

Share:

Description

Creates matrices with discrimination probabilities, number of trials, number of different answers, and stimulus intensities from a data frame.

Usage

1
psi(data, oa1 = "s1", oa2 = "s2", resp = "resp")

Arguments

data

data frame with repeated same-different judgments.

oa1, oa2

name of the variable that contains the stimulus intensities in the first and second observation area.

resp

name of response variable for same-different judgments; answers have to be d and s for "different" and "same" response, respectively.

Details

The data frame must include at least a column for the response and one column each for observation areas one and two. The return value of psi may serve as an input to qdm that fits a quadrilateral dissimilarity model to the judgments.

Value

An object of class psi that consists of the following components:

prob

a matrix of discrimination probabilities per stimulus combination.

ntrials

a matrix of number of trials per stimulus combination.

freq

a matrix of frequencies of different answers per stimulus combination.

x, y

(if possible numeric) vectors of stimulus intensities.

See Also

qdm.

Examples

1
2
data(FMrate)
psi1 <- psi(FMrate[FMrate$id == "subj1",])