Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injury model #2

Open
robj411 opened this issue Dec 16, 2019 · 0 comments
Open

Injury model #2

robj411 opened this issue Dec 16, 2019 · 0 comments

Comments

@robj411
Copy link
Contributor

robj411 commented Dec 16, 2019

A challenge with the injury model is that, if it depends on any parameter that is uncertain, it needs to be re-run with each new parameter sample. If the model run takes a few hours, and we have 1024 parameter samples, this is infeasible.

One solution might be to remove any dependence on uncertain parameters from the model, or, equivalently, decide that the injury model parameters will not be uncertain.

For example, we could decide that distances travelled are not uncertain, and that injury linearity parameters are uncertain. Then, instead of the ITHIM-R version, which is

form <- 'count~...+ offset(log(cas_distance) + log(strike_distance) + (CAS_EXPONENT-1)*log(cas_distance_sum) + (STR_EXPONENT-1)*log(strike_distance_sum))'
mod <- glm(as.formula(form))

we would write

form <- 'count~...+ offset(log(cas_distance) + log(strike_distance))'
mod <- glm(as.formula(form))

in mh-injury/add_distance_to_injury.R to build the model, and predict in mh-execute/metahit_script.R using the scenario distances, and then scale the prediction by

(CAS_EXPONENT-1)*log(scen_cas_distance_sum) + (STR_EXPONENT-1)*log(scen_strike_distance_sum) - (CAS_EXPONENT-1)*log(base_cas_distance_sum)+(STR_EXPONENT-1)*log(base_strike_distance_sum).

If distances are to be uncertain too, then they ought to be excluded from the model build, e.g.

form <- 'count~...'
mod <- glm(as.formula(form))

where ... should now include more interaction terms to allow for inter-city differences that would have been captured by distance.

Then the prediction model would be scaled by

log(scen_cas_distance) + log(scen_strike_distance) - log(base_cas_distance) + log(base_strike_distance) + (CAS_EXPONENT-1)*log(scen_cas_distance_sum) + (STR_EXPONENT-1)*log(scen_strike_distance_sum) - (CAS_EXPONENT-1)*log(base_cas_distance_sum) + (STR_EXPONENT-1)*log(base_strike_distance_sum).

@robj411 robj411 mentioned this issue Dec 16, 2019
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant