PsychParameters: Calculate PSE and JND Parameters from a List of GLM Models

View source: R/psych_utils_multi.R

PsychParametersR Documentation

Calculate PSE and JND Parameters from a List of GLM Models

Description

This function calculates the Point of Subjective Equality (PSE) and Just Noticeable Difference (JND) from a list of fitted Generalized Linear Models (GLMs). It extracts these parameters using the PsychDelta function and returns them in a structured dataframe.

Usage

PsychParameters(model_list, se = TRUE)

Arguments

model_list

A structured list of grouped models obtained from PsychModels. The function can also take as input a GLM model or a list of GLM models.

se

Logical. if TRUE, the function includes columns for standard errors of JND and PSE. Default is TRUE.

Details

The function supports three types of input:

  • A structured list of models (as produced by PsychModels): Extracts PSE and JND for each model and includes the corresponding grouping factors in the output.

  • A single GLM model: Returns a one-row data frame with PSE, JND, and (if requested) standard errors.

  • A list of GLM models: Computes PSE and JND for each model and returns a data frame.

Value

A data frame containing PSE and JND estimates, along with their standard errors (if se = TRUE). If the input is a grouped list of models, the output includes columns for the grouping factors.

See Also

PsychModels, PsychDelta

Examples

model_list <- PsychModels(formula = cbind(Longer, Total - Longer) ~ X,
data = simul_data,
group_factors = "Subject")
psych_parameters <- PsychParameters(model_list)

model_list_vibro <- PsychModels(vibro_exp3,
group_factors = c("subject", "vibration"),
formula = cbind(faster, slower) ~ speed)
psych_parameters_vibro <- PsychParameters(model_list_vibro)
 

moskante/MixedPsy documentation built on Feb. 19, 2025, 12:15 a.m.