Learn R Programming

sensR (version 1.5-2)

dod_fit: Direct fitter of the Thurstonian Degree-of-Difference (DOD) model

Description

Fits the Thurstonian Degree-of-Difference (DOD) model. This function is for programming use. The ordinary user probably wants the dod function, which is for interactive use. dod_fit only estimates the DOD model and performs no hypothesis or significance tests.

Usage

dod_fit(same, diff, tau=NULL, d.prime=NULL, control=dodControl(),
        ...)

Arguments

same

the answers to same-pairs; either 1) a numeric vector of counts of length equal to the number of response categories ordered appropriately or 2) a factor where the levels indicate the response categories.

diff

the answers to different-pairs in the same format as same.

tau

optional vector of boundary parameters. If specified, dod_fit will not optimize over the tau parameters.

d.prime

optional d-prime value. If specified, dod_fit will not optimize over d.prime.

control

options to control the fitting process specfied via a call to dodControl.

not currently used.

Value

An object of class dod_fit.

Details

The standard error of d-prime is not defined when the parameter estimate is zero (or numerically close) and it will be reported as NA in this case.

See Also

dod, dodSim, optimal_tau, dodPwr, dodControl

Examples

Run this code
# NOT RUN {
## DOD example data:
same.pairs <- c(25, 22, 33, 20)
diff.pairs <- c(18, 22, 30, 30)

## Fit Thurstonian dod-model and perform difference test:
fm <- dod_fit(same=same.pairs, diff=diff.pairs)
names(fm)

## Estimate d-prime for given tau:
fm <- dod_fit(same=same.pairs, diff=diff.pairs, tau=1:3)

## Estimate tau for given d-prime:
fm <- dod_fit(same=same.pairs, diff=diff.pairs, d.prime=1)

# }

Run the code above in your browser using DataLab