Description Usage Arguments Value Author(s) Examples
View source: R/profile_likelihood.R
Profile likelihood for R given observations, rho, threshold, accuracy maximum value for R
1 | profile_likelihood(y_obs, rho, threshold, accuracy, max_R)
|
y_obs: |
a vector of outbreak sizes observations. |
rho: |
the probability of a single case being detected. |
threshold: |
the maximum true final size of an outbreak. this need to be much higher than the largest observed outbreak to account for reporting and properly evaluate the distribution of outbreak sizes |
accuracy: |
R will take potential values in a grid spaning from accuracy up to max_R with increments 'accuracy' |
max_R: |
R will take potential values in a grid spaning from accuracy up to max_R with increments 'accuracy' |
The function returns a list including:
theta: a vector of potential parameter values for which the likelihood has been evaluated.
Likelihood: a vector of likelihood evaluated for the potential R values.
#'
Pierre Nouvellet (p.nouvellet@imperial.ac.uk)
1 2 | x <- profile_likelihood(c(1,2,3),.5,1e3,0.01,10)
x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.