# Computing SCC with a changed socioeconomic component in MimiFUND

**URL:** <https://forum.mimiframework.org/t/computing-scc-with-a-changed-socioeconomic-component-in-mimifund/101>\
**Category:** Uncategorized\
**Created:** [November 3, 2019, 12:45am UTC](https://forum.mimiframework.org/t/computing-scc-with-a-changed-socioeconomic-component-in-mimifund/101 "2019-11-03T00:45:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbenveniste](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@hbenveniste](https://forum.mimiframework.org/u/hbenveniste)\
**Post date:** [November 3, 2019, 12:45am UTC](https://forum.mimiframework.org/t/computing-scc-with-a-changed-socioeconomic-component-in-mimifund/101/1 "2019-11-03T00:45:19Z")

</div>

Hi team,

I am trying to compute the SCC for my modified FUND model. My problem is that I modified the `socioeconomic` component, now called `mig_socioeconomic`; and now this component is not recognized by the function `_compute_sc_from_mm` used by `MimiFUND.compute_sc` to compute the SCC.

What would be your suggestion? Should I rewrite my own version of `compute_sc`? Is there a way to do this that would make sure I keep up to date with your changes to `MimiFUND.compute_sc` ?

Thanks!  
Hélène

---

<div class="post-metadata">

**Author:** ![ckingdon95](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/ckingdon95/32/15_2.png) [@ckingdon95](https://forum.mimiframework.org/u/ckingdon95)\
**Post date:** [November 4, 2019, 3:07pm UTC](https://forum.mimiframework.org/t/computing-scc-with-a-changed-socioeconomic-component-in-mimifund/101/2 "2019-11-04T15:07:49Z")

</div>

Hi Hélène,

The internal `_compute_sc_from_mm` function called by `compute_sc` assumes that there is a component named `:socioeconomic` with a parameter or variable called `:ypc` (and if `compute_sc` is called with `equity_weights=true` and `equity_weights_normalization_region=0`, then there must also be a parameter or variable named `:globalypc`).

Does your new `:mig_socioeconomic` component have a parameter or variable called `:ypc` ? If so, then I would recommend naming your component `:socioeconomic` when you add it to your model, and then the `compute_sc` function should still work: `add_comp!(m, mig_socioeconomic, :socioeconomic)` (the optional third argument to `add_comp!` is the name you can give to the component that can be different than the definition of the component).

However, if your `:mig_socioeconomic` component doesn’t have a `:ypc`, then you will need to write your own function. Hope this helps!

---

<div class="post-metadata">

**Author:** ![hbenveniste](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@hbenveniste](https://forum.mimiframework.org/u/hbenveniste)\
**Post date:** [November 4, 2019, 4:21pm UTC](https://forum.mimiframework.org/t/computing-scc-with-a-changed-socioeconomic-component-in-mimifund/101/3 "2019-11-04T16:21:05Z")

</div>

Hi Cora,  
this is very helpful, thanks! I do also have `ypc` and `globalypc` variables so your solution works great.  
Thanks again,  
Hélène
