The magnitude effect is an effect where, as stimulus magnitude increases, it becomes more difficult to detect small increments in stimulus magnitude. You can read about why this is important and how to quantify how stimuli are perceived here:
Dixit, T., Apostol, A.L., Chen, K.-C., Fulford, A.J.C., Town, C.P. & Spottiswoode, C.N. (2022) Visual complexity of egg patterns predicts egg rejection according to Weber’s law. Proceedings of the Royal Society B: Biological Sciences. 289 (1978), 20220710. doi:10.1098/rspb.2022.0710.
This package aims to help researchers conduct similar analysis, in experiments which involve discriminating between two stimuli of different magnitudes.
The ability to discriminate between stimuli often depends on both the absolute and relative differences between two stimuli. This can be summarised with this equation (modified from Dixit et al. 2022):
Note: How should the stimulus magnitude
This package is not yet available on CRAN, but you can download it from GitHub using the package devtools
. Install kber with the following code:
library(devtools) #allows downloads from github
install_github("mzw22/kber") #download package
library(kber)
CRAN install coming soon, perhaps?
estimate_k()
estimates the value of stimulus_model()
can be used to inspect the resulting model, and any other models (eg. stimulus_contrast()
to compute contrast directly.
All models should be used with caution and an understanding of their assumptions. This model of stimulus perception assumes that (a) discrimination can/should be described with a generalised linear model, and (b) discrimination varies with magnitude in an unidirectional manner which can be described by the parameter
I STRONGLY advise plotting your data against the model and using diagnostic plots to assess whether the output is sensible, as with any model fitting in R.
Please send any questions, suggestions and bugs to mzwo142@gmail.com or open an issue at https://github.com/mzw22/kber.