reconhub / earlyR

Estimation of infectiousness in the early stage of an outbreak, with short-term predictions.
http://www.repidemicsconsortium.org/earlyR
Other
9 stars 3 forks source link

get_R: weird likelihood estimation of R #4

Open jeskarp opened 6 years ago

jeskarp commented 6 years ago

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 commented 6 years ago

closed via ae5450aafe736c00334ad2eaed3ec99f48b768a7