lnccbrown / HSSM

Development of HSSM package
Other
82 stars 11 forks source link

Different coordinates for some parameters in the inference data #498

Open hyang336 opened 4 months ago

hyang336 commented 4 months ago

Describe the bug I am not sure if this is an oversight or a conscious design choice. When fitting a DDM model with random intercepts on a, v, and z, the random effect on v has a different coordinate in the returned arviz InferenceData. As far as I can tell the "subj_idx__factor_dim" coord is the same as the "v_1|subj_idx__factor_dim" coord. This may make sub-setting the InferenceData more error-prone.

HSSM version 0.2.2

Screenshots Data variables: a_1|subj_idx (chain, draw, subj_idx__factor_dim) float64 10MB ... a_1|subj_idx_sigma (chain, draw) float64 320kB ... a_Intercept (chain, draw) float64 320kB ... t (chain, draw) float64 320kB ... v_1|subj_idx (chain, draw, v_1|subj_idxfactor_dim) float64 10MB ... v_1|subj_idx_sigma (chain, draw) float64 320kB ... v_Intercept (chain, draw) float64 320kB ... z_1|subj_idx (chain, draw, subj_idxfactor_dim) float64 10MB ... z_1|subj_idx_sigma (chain, draw) float64 320kB ... z_Intercept (chain, draw) float64 320kB ... v (chain, draw, rt,response_obs) float64 861MB ... a (chain, draw, rt,response_obs) float64 861MB ... z (chain, draw, rt,response_obs) float64 861MB ...

digicosmos86 commented 4 months ago

Hi @hyang336,

Thanks for reporting this. This seems to be a bug in Bambi. We have reported this to the bambi devs here. Should be fixed in HSSM once this is fixed in Bambi.