How to do Posterior Predictive Checks for the regression model with other parameters depend on conditions.

110 views
Skip to first unread message

Siyi Chen

unread,
Apr 1, 2020, 11:19:20 AM4/1/20
to hddm-users
Hi, 

I would like to do posterior predictive checks for the parameters generated by the regression model:

m_reg_a = hddm.models.HDDMRegressor(data, ['a ~ epoch:C(condition)'],
                                   depends_on = {'v': ['condition'], 't': ['condition']})
m_reg_a.find_starting_values()
m_reg_a.sample(5000, burn=200, dbname='traces.db', db='pickle')

There are six conditions: u_v.new, u_v.old, m_v.new, m_v.old, m_m.new, m_m.old. Epoch is the within condition variable: one epoch collapses the RT data across 80 trials, with 8 epochs in total. 

The resulting table for the mean and SD for the parameters:

Parameters Mean±SD
v u_v.new 1.53±0.12
v u_v.old         1.68±0.12
v m_v.new 1.66±0.12
v m_v.old         1.95±0.13
v m_m.new 1.59±0.13
v m_m.old 1.81±0.13
t u_v.new         0.45±0.04
t u_v.old         0.46±0.04
t m_v.new 0.39±0.04
t m_v.old         0.34±0.04
t m_m.new 0.36±0.04
t m_m.old 0.33±0.04
β0_a intercept 2.67±0.10
β1_a u_v.new -0.09±0.008
β1_a u_v.old -0.11±0.007
β1_a m_v.new -0.06±0.01
β1_a m_v.old -0.10±0.01
β1_a m_m.new  -0.07±0.01
β1_a m_m.old -0.10±0.01

How could I simulate data from these parameters and include the epoch factor as well?

Many thanks!

Siyi 



Mads Lund Pedersen

unread,
Apr 14, 2020, 5:03:35 AM4/14/20
to hddm-...@googlegroups.com
Hi Siyi,

I don't believe you can use the post_pred_gen function for this model. I would suggest creating a for-loop that for each trial generates data using the assumed trial-specific parameter values and beta-coefficients, which you can access by using 'm_reg_a.get_traces()'.

Best,
Mads

--
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/61fba4a1-9639-4bf5-84d4-680a27954bb2%40googlegroups.com.


--
Best, 
Mads
Reply all
Reply to author
Forward
0 new messages