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

get_R: weird likelihood estimation of R #4

Open
jeskarp opened this issue Jun 12, 2018 · 1 comment
Open

get_R: weird likelihood estimation of R #4

jeskarp opened this issue Jun 12, 2018 · 1 comment

Comments

@jeskarp
Copy link
Contributor

jeskarp commented Jun 12, 2018

If I try to estimate the likelihood of R based on incidence data that has no cases at the end of the observation period, the maximum likelihood of R is estimated to be 0.

Below is an example using a measles outbreak from 1861.

You'll need these packages

library(outbreaks)
library(incidence)
library(earlyR)

We are using this dataset:
measles_hagelloch_1861

We then make an incidence object out of the measles data and take a subset that has few cases at the end of the observation period:

measles_hagelloch_incidence <- incidence(measles_hagelloch_1861$date_of_prodrome, interval = 1)
measles_hagelloch_incidence_sub <- measles_hagelloch_incidence[31:42, ]

And then attempt to estimate R for this observation window:
R_subset <- get_R(measles_hagelloch_incidence_sub, si_mean = 10.89, si_sd = 1.63, max_R = 10)

R is estimated to be 0 as seen in:
plot(R3)

@thibautjombart thibautjombart mentioned this issue Jun 13, 2018
@thibautjombart
Copy link
Contributor

closed via ae5450a

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

3 participants