confband | R Documentation |
Create an approximate confidence band for the Rt or incidence estimate. Note that the variance computation is approximate.
confband(object, lambda, level = 0.95, type = c("Rt", "Yt"), ...)
object |
a |
lambda |
the selected lambda. May be a scalar value, or in the case of
|
level |
the desired confidence level(s). These will be sorted if necessary. |
type |
the type |
... |
additional arguments for methods. Unused. |
A data.frame
containing the estimates Rt
or Yt
at the chosen
lambda
, and confidence limits corresponding to level
y <- c(1, rpois(100, dnorm(1:100, 50, 15) * 500 + 1))
out <- estimate_rt(y, nsol = 10)
head(confband(out, out$lambda[2]))
head(confband(out, out$lambda[2], level = c(0.95, 0.8, 0.5)))
cv <- cv_estimate_rt(y, nfold = 3, nsol = 30)
head(confband(cv, "lambda.min", c(0.5, 0.9)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.