# Model Comparision Example Attribute error

**URL:** https://discourse.pymc.io/t/model-comparision-example-attribute-error/677
**Category:** Questions
**Created:** [December 21, 2017, 11:27am UTC](https://discourse.pymc.io/t/model-comparision-example-attribute-error/677 "2017-12-21T11:27:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![melodramaqueen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/melodramaqueen/32/427_2.png) [@melodramaqueen](https://discourse.pymc.io/u/melodramaqueen)
#### Post date: [December 21, 2017, 11:27am UTC](https://discourse.pymc.io/t/model-comparision-example-attribute-error/677/1 "2017-12-21T11:27:17Z")

</div>

I ran the Model Comparision Example and found that there is an Attribute error when I run the last input. I checked multiple times.

> > pm.compareplot(df\_comp\_LOO);

* * *

AttributeError Traceback (most recent call last)  
 in ()  
----\> 1 pm.compareplot(df\_comp\_LOO);

~/anaconda3/lib/python3.6/site-packages/pymc3/plots/compareplot.py in compareplot(comp\_df, insample\_dev, se, dse, ax, plot\_kwargs)  
55 yticks\_labels[2::2] = comp\_df.index[1:]  
56 ax.set\_yticks(yticks\_pos)  
—\> 57 ax.errorbar(x=comp\_df.WAIC[1:],  
58 y=yticks\_pos[1::2],  
59 xerr=comp\_df.dSE[1:],

~/anaconda3/lib/python3.6/site-packages/pandas/core/generic.py in **getattr** (self, name)  
3612 if name in self.\_info\_axis:  
3613 return self[name]  
 → 3614 return object. **getattribute** (self, name)  
3615  
3616 def **setattr** (self, name, value):

AttributeError: ‘DataFrame’ object has no attribute ‘WAIC’

[https://github.com/melodramaqueen/pymc3-stuff/blob/master/Model%20comparison.ipynb](https://github.com/melodramaqueen/pymc3-stuff/blob/master/Model%20comparison.ipynb)

What should be done here?  
Sampler statistics, Diagnosing Biased Inference with Divergences, Posterior Predictive Checks - works without any problems.

---

<div class="post-metadata">

### Author: ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)
#### Post date: [December 21, 2017, 3:05pm UTC](https://discourse.pymc.io/t/model-comparision-example-attribute-error/677/2 "2017-12-21T15:05:41Z")

</div>

Could you please upgrade pymc3 to master and run the example again? The `pm.compareplot` is recently updated.

---

<div class="post-metadata">

### Author: ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)
#### Post date: [December 21, 2017, 7:13pm UTC](https://discourse.pymc.io/t/model-comparision-example-attribute-error/677/3 "2017-12-21T19:13:32Z")

</div>


