Dorcas-Sang / ISFM-INTERFACES

Impact pathway and impact forecast of Integrated Soil Fertility Management
MIT License
0 stars 0 forks source link

Simulation of risks (chance_event OR min) #7

Open Dorcas-Sang opened 4 months ago

Dorcas-Sang commented 4 months ago

Code example:

farmers_risks <- min (if_no_trust, if_no_patience, if_no_knowledge, if_violence, if_no_acceptance)

OR

farmers_risks <- chance_event(farmers_risk, value_if = 1, n= years)

Does the first example with (min) mean that the probability of these events happening is certain?

CWWhitney commented 4 months ago

Code example:

farmers_risks <- min (if_no_trust, if_no_patience, if_no_knowledge, if_violence, if_no_acceptance)

Gives you the lowest of all the probabilities. You should probably want the highest of all probabilities with 'max' if there is not cumulative effect but you just want to capture which is the most probable. The code returns a single value.

farmers_risks <- chance_event(farmers_risk, value_if = 1, n= years)

In this script you seem to create a list of n_years of 1 or 0.

Does the first example with (min) mean that the probability of these events happening is certain?

None of these are certain. Just probabilities

Dorcas-Sang commented 4 months ago

Thank you @CWWhitney for the input. I tried with (max). The code seems okay now. Simple but running. I willl try to run it now with some input estimates.

CWWhitney commented 4 months ago

Ok Feel free to share your solution here - would be good to see how you managed this in the end