Weibull function for hierarchical bayesian models

Post Reply
LennartG
Posts: 2
Joined: Tue Jun 17, 2025 3:44 am

Weibull function for hierarchical bayesian models

Post 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!
User avatar
Nick Prins
Site Admin
Posts: 28
Joined: Sun Feb 13, 2022 8:55 pm

Re: Weibull function for hierarchical bayesian models

Post 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')
Nick Prins, Administrator
LennartG
Posts: 2
Joined: Tue Jun 17, 2025 3:44 am

Re: Weibull function for hierarchical bayesian models

Post 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.
User avatar
Nick Prins
Site Admin
Posts: 28
Joined: Sun Feb 13, 2022 8:55 pm

Re: Weibull function for hierarchical bayesian models

Post 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.
Nick Prins, Administrator
Post Reply