Page 1 of 1
Weibull function for hierarchical bayesian models
Posted: Tue Sep 09, 2025 2:47 am
by LennartG
Hi all,
I am working with Hierarchical Bayesian models and was wondering if for those models it is also possible to run a Weibull (or Quick) instead of a logistic function as the PF. I have however not been able to find this functionality (yet) in Palamedes for the PFHB.
Does someone know if this is possible and what the correct syntax is to use the Weibull in PFHB fitting?
Thanks in advance!
Re: Weibull function for hierarchical bayesian models
Posted: Tue Sep 09, 2025 6:15 pm
by Nick Prins
You can specify the form of the psychometric function by using the 'PF' argument to the PAL_PFHB_fitModel function. Type 'help PAL_PFHB_fitModel' to see how to use the optional arguments. We very strongly suggest to log-transform stimulus values and using the Gumbel instead of using the Weibull on the untransformed stimulus intensities. Weibull on untransformed intensities and Gumbel on log-transformed intensities are equivalent (see
www.palamedestoolbox.org/weibullandfriends.html) but the later behaves much, much better in fitting procedures and will result in better fit. To use the Gumbel instead of the logistic, use something like:
pfhb = PAL_PFHB_fitModel(data,'PF','gumbel')
Re: Weibull function for hierarchical bayesian models
Posted: Wed Sep 10, 2025 8:47 am
by LennartG
Thanks for the quick reply, this works as intended! I was confused as the page you linked shows a different syntax. I have indeed noticed the differences between the weibull and the gumbel and will stick to the log version of the respective function.
Re: Weibull function for hierarchical bayesian models
Posted: Wed Sep 10, 2025 11:39 am
by Nick Prins
Ah, yes, I see. Thanks for pointing that out. The palamedestoolbox.org/weibullandfriends.html page was created before the PFHB routines even existed. The page demonstrates things using the maximum-likelihood fitting scheme (i.e., using the PAL_PFML routines). And these do use a different syntax compared to the PAL_PFHB routines. As demonstrated on the page, when using a maximum-likelihood criterion the fits are equivalent between using Weibull with linear intensities versus Gumbel with log-transformed intensities. Note though that, when using a Bayesian criterion, the Gumbel fit will actually be somewhat different from the Weibull fit, with the Gumbel fit being the better option.