# How to get CWRES data after inspect(fit)

**URL:** <https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716>\
**Category:** Diagnostics\
**Created:** [June 30, 2022, 5:45am UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716 "2022-06-30T05:45:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai\_matcha](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/sai_matcha/32/297_2.png) [@sai\_matcha](https://discourse.pumas.ai/u/sai_matcha)\
**Post date:** [June 30, 2022, 5:45am UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716/1 "2022-06-30T05:45:08Z")

</div>

Hi.  
I have fit a model to data,then plotted GOF using `goodness_of_fit` function in pumas. It gave me ten different plots (because i used three dependent variables) which includes “ **Time vs Conditional weighted residuals** ” plot in that. I have used `DataFrame(inspect(fit))` toconvert the inspected file into dataframe to plot them manually, but CWRES vaiable is missing in dataframe. Can someone suggest a way to get CWRES data in dataframe.

Thank you

---

<div class="post-metadata">

**Author:** ![vijay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/vijay/32/96_2.png) [@vijay](https://discourse.pumas.ai/u/vijay)\
**Post date:** [June 30, 2022, 10:18am UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716/2 "2022-06-30T10:18:01Z")

</div>

hi @sai_matcha

in the documentation here [Simulation and Estimation Diagnostics · Pumas](https://docs.pumas.ai/stable/analysis/diagnostics/#Weighted-Residuals) it is clearly stated that the `WRES` that is output in the `DataFrame(inspect)` object will output the appropriate residuals based on the approximation being used. So, if you use FOCE, CWRES is output as WRES and if you use FO WRES is output as WRES. Is that clear?

Best,  
Vijay

---

<div class="post-metadata">

**Author:** ![sai\_matcha](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/sai_matcha/32/297_2.png) [@sai\_matcha](https://discourse.pumas.ai/u/sai_matcha)\
**Post date:** [June 30, 2022, 10:44am UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716/4 "2022-06-30T10:44:14Z")

</div>

Thank you @vijay . Can i consider that it is same for FOCEI as FOCE ?

---

<div class="post-metadata">

**Author:** ![vijay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/vijay/32/96_2.png) [@vijay](https://discourse.pumas.ai/u/vijay)\
**Post date:** [June 30, 2022, 10:52am UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716/5 "2022-06-30T10:52:29Z")

</div>

yes, that is correct.

---

<div class="post-metadata">

**Author:** ![andreasnoack](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/andreasnoack/32/22_2.png) [@andreasnoack](https://discourse.pumas.ai/u/andreasnoack)\
**Post date:** [June 30, 2022, 3:23pm UTC](https://discourse.pumas.ai/t/how-to-get-cwres-data-after-inspect-fit/716/6 "2022-06-30T15:23:47Z")

</div>

> [@sai\_matcha](#):
>
> Can i consider that it is same for FOCEI as FOCE ?

Just to be clear. There is not difference between FOCE and FOCEI in Pumas at all. In our interpretation, the two are identical. The use of the name FOCEI has been deprecated and will eventually go away.
