psiPrelec: psiPrelec

Description Usage Arguments Value See Also Examples

Description

This function is a transformation function that takes the log of the log of the inverse (which can be used to generate the Prelec functions). By design, it is robust to the inclusion of the occasional 0, which it maps to a very small value, which can optionally be specified It's appropriate for mapping (0, 1):-> (-inf, inf).

Usage

1
psiPrelec(stimuli, smallValue = 10^-30)

Arguments

stimuli

a vector of positive stimuli, between 0 and inf

smallValue

A value to set nominal 0's to, to avoid errors in plotting simulated data, or aberrant responses

Value

a vector containing "warped" stimuli

See Also

psiLinear, psiLogOdds, psiPrelec, psiLog, psiIdentityInverse

Examples

1
2
psiPrelec(1:100/100)
(0:1000/1000) %>% psiPrelec() %>% vanillaBayes() %>% psiPrelecInverse()  # Implements Prelec, 1998

dlandy/WarpedBayes documentation built on May 29, 2019, 2:49 p.m.