psychometric | R Documentation |
Calculates the Point of Subjective Equality (PSE) and Just Noticeable Difference (JND) from a fitted psychometric model, along with their confidence intervals.
psychometric(model, alpha = 0.05, lme4 = F)
model |
A fitted model object (either a standard linear model or an lme4 model) |
alpha |
Numeric value specifying the significance level for confidence intervals (default = 0.05) |
lme4 |
Logical value indicating whether the model is from lme4 package (default = FALSE) |
The function calculates: * PSE = -α/β where α is the intercept and β is the slope * JND = 1/β where β is the slope * Standard errors and confidence intervals using the delta method
The confidence intervals are calculated as: * estimate ± (z_(1-α/2) * SE) where z_(1-α/2) is the standard normal quantile
A 2x4 matrix containing:
pse |
Point of Subjective Equality estimate, standard error, and confidence interval |
jnd |
Just Noticeable Difference estimate, standard error, and confidence interval |
# For a standard linear model
model <- lm(response ~ stimulus)
psychometric(model)
# For an lme4 model
model <- lmer(response ~ stimulus + (1|subject))
psychometric(model, lme4 = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.