Learn R Programming

MixedPsy (version 1.1.0)

PsychFunction: 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)

Value

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

Arguments

ps.formula

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

ps.link

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

ps.data

a data frame including the variables used in the model.

br

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

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.

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

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

Run the code above in your browser using DataLab