psychometric: Calculate Psychometric Parameters from a Fitted Model

View source: R/psychometric.R

psychometricR Documentation

Calculate Psychometric Parameters from a Fitted Model

Description

Calculates the Point of Subjective Equality (PSE) and Just Noticeable Difference (JND) from a fitted psychometric model, along with their confidence intervals.

Usage

psychometric(model, alpha = 0.05, lme4 = F)

Arguments

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)

Details

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

Value

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

Examples

# 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)


ccamp83/mu documentation built on Nov. 7, 2024, 5:17 p.m.