# Model sensitivity and selecting parameter space

**URL:** <https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215>\
**Category:** Science, Research & Data\
**Tags:** sdr\
**Created:** [November 14, 2022, 6:53am UTC](https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215 "2022-11-14T06:53:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gismat](https://avatars.discourse-cdn.com/v4/letter/g/e95f7d/32.png) [@gismat](https://community.naturalcapitalalliance.org/u/gismat)\
**Post date:** [November 14, 2022, 6:53am UTC](https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215/1 "2022-11-14T06:53:11Z")

</div>

My workflow for model sensitivity analysis follows your excellent [guide](https://github.com/natcap/invest/blob/main/doc/api-docs/scripting.rst).

I am testing sensitivity to k\_param, ic0\_param, sdr\_max, and l\_max. To do this, I am interating the script over (one at a time)  
`[0.12,0.25,0.5,0.75,1,5,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,30,40,50,100]`

My question is: what is the range I ought to be testing - here, for all 4 parameters I am testing over the parameter space: 0.12 - 100, which might be excessive (and I have done it, and it seems excessive).

As an example, for k\_param, the guide encourages start at 2, and alter by 10% (I assume 0.2) per run to analyse sensitivity to k\_param. In my set I have gone to 100 but it makes me wonder: what are the theoretical bounds for the 4 parameters (k\_param, ic0\_param, sdr\_max, and l\_max).

---

<div class="post-metadata">

**Author:** ![jesseG](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jesseg/32/1068_2.png) [@jesseG](https://community.naturalcapitalalliance.org/u/jesseG)\
**Post date:** [November 22, 2022, 5:38pm UTC](https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215/2 "2022-11-22T17:38:38Z")

</div>

Hi @gismat,

Thanks for writing in with your question. I’m not a hydrologist, but I’ll share my perspective here on recommended ranges. I do not claim to know the theoretical bounds for all but one of these four parameters.

I recommend referring to [Hamel 2015 et al.](http://dx.doi.org/10.1016/j.scitotenv.2015.04.027) (referenced in the [InVEST User Guide](https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-userguide/latest/sdr.html#comparison-with-observations)). In addition to providing good guidance on how to perform sensitivity analysis on the InVEST SDR model, at the bottom of Table 1 there, you will see they claim to have varied _k_ from `1` to `3` and _IC0_ from `0.25` to `0.75`. These values should always remain low. However, to be safe, I’d recommend going with the values revealed in their Figure 5:

- _k_ between `0.5` and `3.0`,
- _IC0_ between `0.1` and `0.8`,
- _SDRmax_ between `0` and `1.0`, and with my addition of
- _Lmax_ bewteen `122` and `333`.

Valid values for _SDRmax_ are clamped between `0` and `1`, since it’s a ratio, so certainly do not go above `1` for that parameter. **Please also note that the model responds proportionally to a change in _SDRmax_, so it’s likely not worth analyzing that parameter.**

_Lmax_ is the parameter I’m least certain about, so it’s possible you would want to test outside the range I recommended, but those values should almost certainly all be \> ~`100`.

I hope this helps,  
Jesse

Jesse Goldstein  
GIS Analyst  
Natural Capital Project, Stanford University

---

<div class="post-metadata">

**Author:** ![RafaSchmitt](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@RafaSchmitt](https://community.naturalcapitalalliance.org/u/RafaSchmitt)\
**Post date:** [November 22, 2022, 6:08pm UTC](https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215/3 "2022-11-22T18:08:17Z")

</div>

Hi @gismat I commend your approach for an in-depth sensitivity analysis. To echo what Jesse wrote below, you need to be careful about the meaning of the parameters. E.g., SDR\_max is by definition from 0-1, so sampling from 0.12-100 does not make sense. You should sample this parameter between 0 and 1.  
Similarly, l\_max is usually set at either 122m or 333m, and this range is pretty deeply engrained in the original formulation of the USLE model. So setting it to values far outside of it will likely yield non-sensical results (very low or very very high erosion rates). For you likely very low as all values you use are below the recommended lower limit of 122m.  
I’d suggest reviewing some literature for each parameter in order to find a good lower and upper bound (e.g., 0-1 for SDR max, 122 - 333 for lmax) and then sampling 10 values (x values) within that range.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8d95591aa074da87ea0fdd61ca47c1c3c0588aa7.png) [@system](https://community.naturalcapitalalliance.org/u/system)\
**Post date:** [November 29, 2022, 6:08pm UTC](https://community.naturalcapitalalliance.org/t/model-sensitivity-and-selecting-parameter-space/3215/4 "2022-11-29T18:08:40Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
