PsychFunction: Psychometric Function and PSE/JND Parameters from...

Description Usage Arguments Details Value Note References See Also Examples


Fit psychometric functions using glm or brglm. Estimate PSE, JND, and related confidence intervals with Delta Method.


PsychFunction(ps.formula,,, br = F)



an object of class formula, such as cbind(yes, no) ~ X

link function for the binomial family of error distribution. Default is probit.

a data frame including the variables used in the model.


logical. If TRUE, brglm for bias reduction is used if values are equal to 0 or 1. Default is FALSE.


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.


PsychFunction returns a list including the fitted model, the estimate of PSE and JND and a flag to indicate if brglm was called.


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.


Faraggi, D., Izikson, P., & Reiser, B. (2003). Confidence intervals for the 50 per cent response dose. Statistics in medicine, 22(12), 1977-1988.

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.


data.S1 <- subset(simul_data, Subject == "S1")
psych.S1 <- PsychFunction(ps.formula = cbind(Longer, Total - Longer) ~ X, = "probit", = data.S1)

MixedPsy documentation built on Nov. 9, 2021, 1:08 a.m.