MBB-team / VBA-toolbox

The VBA toolbox
GNU General Public License v3.0
130 stars 67 forks source link

[very minor] AIC - BIC calculation #78

Closed romainligneul closed 5 years ago

romainligneul commented 5 years ago

Hi Lionel,

The calculation of AIC and BIC values (at least when fitting multinomial data) does not adjust to the option updateX0, so that hidden states are still counted as free parameters even when they cannot be updated.

It is a very minor problem though as they can be recalculated post-hoc using LL.

Romain

lionel-rigoux commented 5 years ago

Hi Romain,

Thanks for spotting this. I will have a look and see with Jean if this is an intended behavior or not. In the meantime, setting SigmaX0 to zeros(dim.n) would effectively prevent any update of X0 and properly account for the degrees of freedom.

lionel-rigoux commented 5 years ago

Hi Romain,

It seems that this is indeed the intended behaviour, as stated in the wiki. Setting the prior variance to 0 is the only effective way to fix the parameters. The various "updatedXX" flags are only internal options to allow partial inference to speed up some iterations and should not be used to specify the model.