Hi Juan,
FYI - you forgot to reply to the mailing list in your previous email…
As for the problem, as Eric mentioned, it seems to be a problem with your plot_posterior_nodes function. That one is out of the matplotlib library, and I guess it belongs to the HDDM package. You might want to ask people in their mailing list for more help,
Shawn
···
On Wed, Jun 3, 2015 at 2:10 PM, Juan Wu <wujuan22@…287…> wrote:
Shawn,
Thanks so much for your prompt reply. This is my code, but it calls other package (i.e., HDDM).
v_Neutral, v_Win, v_Loss = m_within_subj.nodes_db.ix[[“v_Intercept”,
“v_C(Value_Cond, Treatment(‘Neutral’))[T.Win]”,
“v_C(Value_Cond, Treatment(‘Neutral’))[T.Loss]”], ‘node’]
hddm.analyze.plot_posterior_nodes([v_Neutral, v_Win, v_Loss])
plt.xlabel(‘drift-rate’)
plt.ylabel(‘Posterior probability’)
plt.title(‘Group mean posteriors of within-subject drift-rate effects.’)
plt.savefig(‘E4_within_subject_design.pdf’)
I also tried this, but it also did not work.
v_Neutral, v_Win, v_Loss = m_within_subj.nodes_db.ix[[“v_Intercept”,
“v_C(Value_Cond, Treatment(‘Neutral’))[T.Win]”,
“v_C(Value_Cond, Treatment(‘Neutral’))[T.Loss]”], ‘node’]
#hddm.analyze.plot_posterior_nodes([v_Neutral, v_Win, v_Loss])
hddm.analyze.plot_posterior_nodes([float(v_Neutral), float(v_Win), float(v_Loss)])
plt.xlabel(‘drift-rate’)
plt.ylabel(‘Posterior probability’)
plt.title(‘Group mean posteriors of within-subject drift-rate effects.’)
plt.savefig(‘E4_within_subject_design.pdf’)
–
On Wed, Jun 3, 2015 at 2:06 PM, Yuxiang Wang <yw5aj@…809…> wrote:
Hi Juan,
Could you post a minimal code to reproduce your issue?
Shawn
On Wed, Jun 3, 2015 at 2:03 PM, Juan Wu <wujuan22@…287…> wrote:
Hi, List experts,
Any one can help for this error solution? I googled but did not find this report.
Thanks in adance…
<matplotlib.figure.Figure at 0x1afe8f50>
Traceback (most recent call last):
File “”, line 5, in
hddm.analyze.plot_posterior_nodes([float(v_Neutral), float(v_Win), float(v_Loss)])
File “C:\Anaconda\lib\site-packages\kabuki\analyze.py”, line 34, in plot_posterior_nodes
lb = min([min(node.trace()[:]) for node in nodes])
AttributeError: ‘float’ object has no attribute ‘trace’
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Yuxiang “Shawn” Wang
Gerling Research Lab
University of Virginia
yw5aj@…809…
+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/
–
Yuxiang “Shawn” Wang
Gerling Research Lab
University of Virginia
yw5aj@…809…
+1 (434) 284-0836
https://sites.google.com/a/virginia.edu/yw5aj/