Intercept Choice (+0 or not) Impact in HDDMRegression: Differences on Nodes

144 views
Skip to first unread message

Terry Zhang

unread,
Oct 18, 2023, 12:08:58 PM10/18/23
to hddm-users

Hello everyone, I'd like to ask about the specific purpose of the intercept term in HDDMRegression and the issues I've encountered.

 

My environment is Windows + Python 3.8 + HDDM 0.8.0 + kabuki 0.6.

My experiment is a mixed design with one between-subject variable (group: youth/elder) and one within-subject variable (condition: A/B/C). I'm interested in the relative differences in drift rates (v, and maybe other parameters) for the three levels of the condition in the two populations.

 

I've set up two models:

 

Model 1: the conventional model with default intercept: "v ~ group:C(condition, Treatment('A'))"

Model 2: a model with the intercept suppressed: "v ~ 0 + group:C(condition, Treatment('A'))"

 

I have three questions:

Q1. What's the difference between these two models, and which one should I use?

Q2. Why is model 1 significantly slower than model 2, and it almost take forever when I want to estimate other parameters (e.g., a or t) further?

Q3. More importantly, I've noticed that the models have different nodes in their 'model.nodes_db' attribute.

 

In model 2, I can find these nodes:

v_group[elder]:C(condition, Treatment('A'))[A]

v_group[youth]:C(condition, Treatment('A'))[A]

v_group[elder]:C(condition, Treatment('A'))[B]

v_group[youth]:C(condition, Treatment('A'))[B]

v_group[elder]:C(condition, Treatment('A'))[C]

v_group[youth]:C(condition, Treatment('A'))[C]

With these nodes, I can perform the analyses I expected. However, in model 1, I can only find these nodes:

v_C(shape, Treatment('A'))[T.B]

v_C(shape, Treatment('A'))[T.C]

v_group[T.youth]:C(condition, Treatment('A'))[A]

v_group[T.youth]:C(condition, Treatment('A'))[B]

v_group[T.youth]:C(condition, Treatment('A'))[C]

There's no posterior distribution for conditions of 'elder' in model 2, which prevents me from performing the analyses I want (I want to see the distributions for both youth and elder participants across the three conditions). Can someone explain why this is happening?

 

In summary, model 2 seems to allow the analysis I expected, but it's very slow, and I'm unsure if it's the correct approach. Model 1 gives incomplete results. I'm currently puzzled and not sure how to proceed.

 

Thank you in advance for your help. This is a fantastic forum!

 

Best,

Terry

Alexander Fengler

unread,
Oct 22, 2023, 10:50:49 PM10/22/23
to hddm-users
I think there is a mix-up in terms of what is model 1 and what is model 2 halfway through your message could that be?
Model 1 is the slow one or model 2?

Concerning the nodes in model 1, it seems like whats going on is that HDDM chooses as baseline the condition v_group[elder]:C(condition, Treatment('A'))[A] 
 (which should be something like just `v_intercept` or so). 

Then v_C(shape, Treatment('A'))[T.B]    v_C(shape, Treatment('A'))[T.C]  rrefer to the [elder] group as well.

So this should be ok to analyze?

Best,
Alex

Terry Zhang

unread,
Oct 23, 2023, 3:54:12 AM10/23/23
to hddm-users
Hi, Alex

Thank you for your thoughtful response, and I apologize for the mix-up. Model 2 is the slower one.

Following your suggestion, I attempted to treat  v_Interceptv_C(shape, Treatment('A'))[T.B] ,  and  v_C(shape, Treatment('A'))[T.C]  as three conditions within the  [elder] group. While the analysis ran without issues, the results appear rather peculiar. The posterior distribution pattern of v differs significantly from any model I've previously explored. I suspect there might be an anomaly in this model. Do you have any further guidance? Once again, I greatly appreciate your input!

Best regards, 
Terry

Michael J Frank

unread,
Oct 23, 2023, 7:36:00 AM10/23/23
to hddm-...@googlegroups.com
Hi Terry, let me just add that HDDM is not set up for mixed between and within subject designs and there can be poor convergence, which might relate to your issue. (This is fixed in HSSM). 

For HDDM, my suggestion is to run separate within-subject models for each group and then extract the traces to compare them across groups afterwards (see previous posts on this listserv on mixed designs, and e.g. this paper using the above approach).


Michael 

Michael J Frank, PhD | Edgar L. Marston Professor
Brown University
website 



--
You received this message because you are subscribed to the Google Groups "hddm-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hddm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hddm-users/3ac1c19f-fc34-4dec-bac4-3c9be24a36d4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages