PlotSensitivityDecline: Show decline in visual sensitivity from choice history biases

Description Usage Arguments Examples

Description

Displays decline in visual sensitivity as a result of choice history biases. It can show reduction in contrast sensitivity (75 change in slope of psychometric function (in case of probit, smaller slope means less sensitivity).

Usage

1
2
PlotSensitivityDecline(simThAndSlope, whatToPlot = "slope",
  whatToReturn = "plot")

Arguments

simThAndSlope

simulated threshold and slope computed using function NoBiasVsSubjectBias (see example below).

whatToPlot

either decline of slope or threshold can be plotted

whatToReturn

return either 'plot' as ggplot object or 'data' prepared for plotting, which can be used for other operations, or 'stats'. 'stats' parameter shows p value of one-sampled test of median change (whether sensitivity decline is significantly different from 0)

Examples

1
2
3
4
5
load('20150919_allWeights_RIKEN_UCL_Stanford_cond1n13.RData',verbose=TRUE)
regWeights <- droplevels(subset(allWeights, Regularized=='yes'))
oneSbjWeights <- droplevels(subset(regWeights, SubjectID %in% c('s001', 's002', 's003', 's009', 's008', 's007')))
thAndSlope <- NoBiasVsSubjectBias(regWeights, nTrialsPerContrast=10, B=5) # B=5 is for fast simulation, for meaningful results use B>500.
PlotSensitivityDecline(thAndSlope) #

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