FitProbit: Fit probit psychometric function

Description Usage Arguments Examples

Description

Fits probit (cummmulative Gaussian) to proportion of rightward responses. The best fit after Weibull (with log transformed contrast values). Can fit with or without lapse rate.

Usage

1
FitProbit(dat, fitWithLapseRate = FALSE)

Arguments

dat

prorotion of rightward responses computed using the function ProportionRightwardResponses

fitWithLapseRate

if TRUE, fits probit that takes into account the lapse rate, which is computed as a proportion of incorrect responses to the highest stimulus intensity (this is safe to do for our experiment, cause we deliberately selected highest stimulus intensity to be 100 part of 'dat'.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
oneRun <- droplevels(subset(glmData, SubjectID=='s025' & SessionID==3))
pRight <- ProportionRightwardResponses(oneRun)
probitModel <- FitProbit(pRight)
range <- c(-0.08,0.08)
predicted <- PredVals(probitModel, xvar="Contrast", yvar="pRightCorrect", type="response", xrange=range)
ggplot(pRight, aes(x=Contrast, y=pRightCorrect))+
 ylim(0,1) +
 scale_x_continuous(limits=range, breaks=seq(range[1],range[2], 0.02)) +
 geom_point() +
 geom_line(data=predicted, aes(x=Contrast, y=pRightCorrect))

armanabraham/chb documentation built on May 10, 2019, 1:39 p.m.