Open jphill01 opened 10 months ago
Gemma responded that the code should be
res_vec$Value_of_Total_Mortality_NF[month] <- res_vec$Total_Mortality_NF[month] * sample(fvNF, 1)
since fvNF
is a distribution.
It seems someone altered the code at some point. We're currently digging into it.
There is a pesky bug in the code at lines 699-714 regarding the value of total mortality for all age:sex groups.
e.g.
res_vec
is a list of vectors for variables of interestfvNF
is the financial value for neonatal females and is a vector of lengthnruns
(here, 10000)month
is a looping index ranging from 1-12At the end of a simulation run,
Value_of_Total_Mortality_NF
contains 12 values. However, the above line of code is not valid in R.The LHS is a single value, while the RHS is vector of length
nruns
.Gemma's code throws a warning, so something is amiss. I have emailed her to inquire.