View source: R/psych_utils_multi.R
PsychModels | R Documentation |
The function fits psychometric functions to data using glm
for multiple groups. It supports the use of a binomial error distribution.
PsychModels(data, group_factors = NULL, formula, link = "probit")
data |
a data frame containing the variables to be used in the model. |
group_factors |
a character vector specifying the grouping variables in the dataset. If |
formula |
the formula of the |
link |
the link function. A character string specifying the link function to be used. By default, |
This function allows the fitting of psychometric functions to grouped data. If grouping variables are provided through group_factors
, separate models are fit to each group. The function returns a list of models, one for each group, where the model for each group is fitted using the specified formula
and link
.
The models are returned as a named list, with each list element containing the fitted GLM model and the associated group-level information.
glm
, PsychParameters
model_list <- PsychModels(formula = cbind(Longer, Total - Longer) ~ X,
data = simul_data,
group_factors = "Subject")
model_list_vibro <- PsychModels(vibro_exp3,
group_factors = c("subject", "vibration"),
formula = cbind(faster, slower) ~ speed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.