| PsychPlot | R Documentation | 
Plot a psychometric function given an object of class glm or brglm. 
The plot can be drawn on a new or existing ggplot object.
PsychPlot(
  model.obj,
  addTo = NULL,
  showData = TRUE,
  ps.type = "solid",
  ps.size = 1,
  ps.lab = ""
)
model.obj | 
 the fitted psychometric function. An object of class   | 
addTo | 
 specifies an existing   | 
showData | 
 logical, defines if proportion of binomial responses for each stimulus level are presented. Default is TRUE.  | 
ps.type, ps.size | 
 type and size of the plotted line (see   | 
ps.lab | 
 label assigned to the psychometric curve. The label is coded by the color aesthetic.  | 
PsychPlot returns a ggplot object.
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
Knoblauch, K., & Maloney, L. T. (2012). Modeling psychophysical data in R (Vol. 32). Springer Science & Business Media.
glm for for Generalized Linear Models.
PsychFunction for estimation of PSE and JND.
MixPlot for plotting individual responses from a GLMM.
data.S1 <- subset(simul_data, Subject == "S1")
psych.S1 <- PsychFunction(ps.formula = cbind(Longer, Total - Longer) ~ X, 
ps.link = "probit", ps.data = data.S1)
plotP1 <- PsychPlot(psych.S1$model, showData = TRUE, ps.lab = "S1") 
data.S2 <- subset(simul_data, Subject == "S2")
glm.S2 <- glm(formula = cbind(Longer, Total - Longer) ~ X, 
           family = binomial(link = "probit"), data = data.S2)
plotP2 <- PsychPlot(glm.S2, addTo = plotP1, ps.lab = "S2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.