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!
Weibull function for hierarchical bayesian models
- Nick Prins
- Site Admin
- Posts: 28
- Joined: Sun Feb 13, 2022 8:55 pm
Re: Weibull function for hierarchical bayesian models
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')
pfhb = PAL_PFHB_fitModel(data,'PF','gumbel')
Nick Prins, Administrator
Re: Weibull function for hierarchical bayesian models
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.
- Nick Prins
- Site Admin
- Posts: 28
- Joined: Sun Feb 13, 2022 8:55 pm
Re: Weibull function for hierarchical bayesian models
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