Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Mar 2:17:1108311.
doi: 10.3389/fncom.2023.1108311. eCollection 2023.

Bayesian hierarchical models and prior elicitation for fitting psychometric functions

Affiliations

Bayesian hierarchical models and prior elicitation for fitting psychometric functions

Maura Mezzetti et al. Front Comput Neurosci. .

Abstract

Our previous articles demonstrated how to analyze psychophysical data from a group of participants using generalized linear mixed models (GLMM) and two-level methods. The aim of this article is to revisit hierarchical models in a Bayesian framework. Bayesian models have been previously discussed for the analysis of psychometric functions although this approach is still seldom applied. The main advantage of using Bayesian models is that if the prior is informative, the uncertainty of the parameters is reduced through the combination of prior knowledge and the experimental data. Here, we evaluate uncertainties between and within participants through posterior distributions. To demonstrate the Bayesian approach, we re-analyzed data from two of our previous studies on the tactile discrimination of speed. We considered different methods to include a priori knowledge in the prior distribution, not only from the literature but also from previous experiments. A special type of Bayesian model, the power prior distribution, allowed us to modulate the weight of the prior, constructed from a first set of data, and use it to fit a second one. Bayesian models estimated the probability distributions of the parameters of interest that convey information about the effects of the experimental variables, their uncertainty, and the reliability of individual participants. We implemented these models using the software Just Another Gibbs Sampler (JAGS) that we interfaced with R with the package rjags. The Bayesian hierarchical model will provide a promising and powerful method for the analysis of psychometric functions in psychophysical experiments.

Keywords: Bayesian model; PSE; generalized linear mixed models; psychometric functions; psychophysics.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Figures

Figure 1
Figure 1
Posterior estimates of parameters bh (slope). Experiment in Section 3.1.
Figure 2
Figure 2
Posterior estimates of parameters PSEh. Experiment in Section 3.1.
Figure 3
Figure 3
Posterior estimates of individual parameters of pseih. The (left) figure illustrated with red lines represents conditions with masking vibrations, while the (right) figure illustrated with blue lines represents conditions without masking vibrations. Experiment in Section 3.1.
Figure 4
Figure 4
Posterior estimates of individual parameters of βih. The (left) figure illustrated with red lines represents conditions with masking vibrations while the (right) figure illustrated with blue lines represents conditions without masking vibrations. Experiment in Section 3.1.
Figure 5
Figure 5
Psychometric functions of individual participants from Experiment 1 in conditions without masking vibrations. The scatter plot shows the observed (dots) versus predicted responses (solid lines) with data from individual participants illustrated in each panel. Blue lines correspond to the prediction by GLMM, while red lines correspond to predictions by the Bayesian model. Experiment in Section 3.1.
Figure 6
Figure 6
Psychometric functions of individual participants from Experiment 1 in conditions with 32 Hz masking vibrations. The scatter plot shows the observed (dots) versus predicted responses (solid lines) with data from individual participants illustrated in each panel. Blue lines correspond to the prediction by GLMM, while red lines correspond to predictions by the Bayesian model. Experiment in Section 3.1.
Figure 7
Figure 7
Posterior distributions of parameters bkh from the second stage of the hierarchical model. Experiment in Section 3.2.
Figure 8
Figure 8
Posterior distributions of parameters of the second stage of the hierarchical model PSEkh. Experiment in Section 3.2.
Figure 9
Figure 9
Posterior distributions of parameters of the first stage of the hierarchical model βih, by group and masking condition. Experiment in Section 3.2.
Figure 10
Figure 10
Posterior distributions of parameters of the first stage of the hierarchical model PSEih, by group and masking condition. Experiment in Section 3.2.
Figure 11
Figure 11
Posterior distributions of parameters PSEh with different prior distributions for different values of a0. The model with the informative prior (a0 = 1.0) is illustrated in dark brown, the one with the power prior (α0 = 0.7) in orange, and the one with the non-informative prior (α0 = 0.0) in yellow. Experiment in Section 3.2.
Figure 12
Figure 12
Posterior distributions of parameters bh with different prior distributions for different values of a0. The model with the informative prior (a0 = 1.0) is illustrated in dark brown, the one with the power prior (a0 = 0.7) in orange, and the one with the non-informative prior (a0 = 0.0) in yellow. Experiment in Section 3.2.

References

    1. Agresti A. (2002). Categorical Data Analysis, Vol. 482. Hoboken, NJ: John Wiley & Sons.
    1. Alcalá-Quintana R., García-Pérez M. A. (2004). The role of parametric assumptions in adaptive bayesian estimation. Psychol. Methods 9, 250. 10.1037/1082-989X.9.2.250 - DOI - PubMed
    1. Balestrucci P., Ernst M. O., Moscatelli A. (2022). Psychophysics with R: the R Package MixedPsy. bioRxiv 2022.06.20.496855. 10.1101/2022.06.20.496855 - DOI
    1. Bates D., Mächler M., Bolker B., Walker S. (2015). Fitting linear mixed-effects models using lme4. J. Stat. Softw. 67, 1–48. 10.18637/jss.v067.i01 - DOI
    1. Chen M.-H., Ibrahim J. G. (2006). The relationship between the power prior and hierarchical models. Bayesian Anal. 1, 551–574. 10.1214/06-BA118 - DOI