# PsychDelta: PSE/JND from GLM Using Delta Method In MixedPsy: Statistical Tools for the Analysis of Psychophysical Data

## Description

Estimate Point of Subjective Equivalence (PSE), Just Noticeable Difference (JND), and related Standard Errors of an individual participant by means of Delta Method. The method only applies to a GLM (object of class `glm`) with one continuous predictor and a probit link function.

## Usage

 `1` ```PsychDelta(model.obj, alpha = 0.05, p = 0.75) ```

## Arguments

 `model.obj` the fitted psychometric function. An object of class `glm`. `alpha` significance level of the confidence interval.Default is 0.05 (95% confidence interval). `p` probability value relative to the JND upper limit. Default is 0.75 (value for 50% JND).

## Details

`PsychDelta` estimates PSE and JND of a psychometric function (object of class `glm`).

## Value

`PsychDelta` returns a matrix including estimate, standard error, inferior and superior bounds of the confidence interval of PSE and JND. Confidence Intervals are computed as: Estimate +/- z(1-(α/2)) * Std.Error.

## Note

The function assumes that the first model coefficient is the intercept and the second is the slope. The estimate of the JND assumes a 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

Knoblauch, K., & Maloney, L. T. (2012). Modeling psychophysical data in R (Vol. 32). Springer Science & Business Media.

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

`glm` for fitting a Generalized Linear Model to a single-subject response. `glmer` for Generalized Linear Mixed Models (including fixed and random effects). `MixDelta` for estimating PSE and JND at a population level with delta method.
 ```1 2 3 4``` ```data.S1 <- subset(simul_data, Subject == "S1") model.glm = glm(formula = cbind(Longer, Total - Longer) ~ X, family = binomial(link = "probit"), data = data.S1) PsychDelta(model.glm) ```