PsychFunction {MixedPsy} | R Documentation |
Psychometric Function and PSE/JND Parameters from Single-Subject Response
Description
Fit psychometric functions using glm
or brglm
.
Estimate PSE, JND, and related confidence intervals with Delta Method.
Usage
PsychFunction(ps.formula, ps.link, ps.data, br = F)
Arguments
ps.formula |
an object of class |
ps.link |
link function for the binomial family of error distribution. Default is |
ps.data |
a data frame including the variables used in the model. |
br |
logical. If TRUE, |
Details
Estimates are computed only for GLM of the type F(Y) ~ X
, where X is a continuous
predictor. Std. Errors and 95% confidence intervals of PSE and JND are estimated via Delta Methods.
Currently only working with probit link function.
Value
PsychFunction
returns a list including the fitted model,
the estimate of PSE and JND and a flag to indicate if brglm
was called.
Note
PsychFunction
returns the same parameter estimate as PsychDelta
, without an explicit call to glm
.
Moreover, it allows to fit the model using brglm
in case of complete or quasi separation.
References
Faraggi, D., Izikson, P., & Reiser, B. (2003). Confidence intervals for the 50 per cent response dose. Statistics in medicine, 22(12), 1977-1988. https://doi.org/10.1002/sim.1368
Moscatelli, A., Mezzetti, M., & Lacquaniti, F. (2012). Modeling psychophysical data at the population-level: The generalized linear mixed model. Journal of Vision, 12(11):26, 1-17. doi:10.1167/12.11.26
See Also
glm
for Generalized Linear Models.
brglm
for fitting a GLM using bias reduction.
PsychPlot
for plotting a psychometric function given a glm
(or brglm
) object.
PsychPlot
for plotting a a psychometric function from a GLM.
PsychShape
for plotting a psychometric function given PSE and JND.
Examples
data.S1 <- subset(simul_data, Subject == "S1")
psych.S1 <- PsychFunction(ps.formula = cbind(Longer, Total - Longer) ~ X,
ps.link = "probit", ps.data = data.S1)