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

Introduce confidence interval to the injury model #100

Open
usr110 opened this issue May 26, 2022 · 0 comments
Open

Introduce confidence interval to the injury model #100

usr110 opened this issue May 26, 2022 · 0 comments

Comments

@usr110
Copy link
Member

usr110 commented May 26, 2022

For the underlying poisson injury model, using Standard Errors (SE), include confidence interval in the model and follow it through to the final outputs.

For the 95 % interval, use the equations below:

> lower_bound = predicted_value - (1.96 * standard_error)
> upper_bound = predicted_value + (1.96 * standard_error)

Use type = 'link' for the predict function and linkinv function to predict fitted and lower and upper values

fit_resp = ilink(fit_link),
upper = ilink(fit_link + (2 * se_link)),
lower = ilink(fit_link - (2 * se_link)))

where ilink is

ilink <- family(model)$linkinv

Reference: https://fromthebottomoftheheap.net/2018/12/10/confidence-intervals-for-glms/

usr110 added a commit that referenced this issue May 26, 2022
usr110 added a commit that referenced this issue May 27, 2022
usr110 added a commit that referenced this issue May 31, 2022
…s arises when `standard errors` are too high. In that case, use the `response` type and its `standard errors` instead. Need to revisit this after talking to Chris. Re #100
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