]> nmode's Git Repositories - Rnaught/blob - man/WP_unknown.Rd
Create .Rbuildignore
[Rnaught] / man / WP_unknown.Rd
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/WP_unknown.R
3 \name{WP_unknown}
4 \alias{WP_unknown}
5 \title{WP method background function WP_unknown}
6 \usage{
7 WP_unknown(NT, B = 100, shape.max = 10, scale.max = 10, tol = 0.999)
8 }
9 \arguments{
10 \item{NT}{Vector of case counts.}
11
12 \item{B}{Length of grid for shape and scale (grid search parameter).}
13
14 \item{shape.max}{Maximum shape value (grid \code{search} parameter).}
15
16 \item{scale.max}{Maximum scale value (grid \code{search} parameter).}
17
18 \item{tol}{cutoff value for cumulative distribution function of the serial distribution (defaults to 0.999).}
19 }
20 \value{
21 The function returns \code{Rhat}, the maximum likelihood estimator of R0, as well as the maximum
22 likelihood estimator of the discretized serial distribution given by \code{p} (the probability mass
23 function) and \code{range.max} (the distribution has support on the integers one to \code{range.max}).
24 The function also returns \code{resLL} (all values of the log-likelihood) at \code{shape} (grid for
25 shape parameter) and at \code{scale} (grid for scale parameter), as well as \code{resR0} (the full
26 vector of maximum likelihood estimators), \code{JJ} (the locations for the likelihood for these), and
27 \code{J0} (the location for the maximum likelihood estimator \code{Rhat}). If \code{JJ} and \code{J0}
28 are not the same, this means that the maximum likelihood estimator is not unique.
29 }
30 \description{
31 This is a background/internal function called by \code{WP}. It computes the maximum likelihood estimator
32 of R0 assuming that the serial distribution is unknown but comes from a discretized gamma distribution.
33 The function then implements a simple grid search algorithm to obtain the maximum likelihood estimator
34 of R0 as well as the gamma parameters.
35 }
36 \keyword{internal}