Package 'summrt'

Title: What the Package Does (One Line, Title Case)
Description: What the package does (one paragraph).
Authors: First Last [aut, cre] (ORCID: YOUR-ORCID-ID)
Maintainer: First Last <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2026-05-17 09:11:07 UTC
Source: https://github.com/EpiForeSITE/summrt

Help Index


Coerce summrt_summary object to a tibble

Description

Coerce summrt_summary object to a tibble

Usage

## S3 method for class 'summrt_summary'
as_tibble(x, add_pkg_id = FALSE, ...)

Arguments

x

A summrt_summary object

add_pkg_id

Logical. Should the pkg field be included as a column.

...

ignored.

Value

A tibble::tibble()

Examples

ex <- readRDS(system.file(
  "extdata", "EpiEstim_example.rds", package = "summrt"
))
summ_ex <- summarize_rtestimate(ex)
as_tibble(summ_ex)
as_tibble(summ_ex, add_pkg_id = TRUE)

Plot a summrt_summary object

Description

Plot a summrt_summary object

Usage

## S3 method for class 'summrt_summary'
autoplot(object, color = "dodgerblue4", add_reference_line = TRUE, ...)

Arguments

object

A summrt_summary object

color

A character string giving a color

add_reference_line

Logical. Display a horizontal line at 1.

...

not used.

Value

A ggplot2::ggplot() object.

Examples

ex <- readRDS(system.file(
  "extdata", "EpiEstim_example.rds", package = "summrt"
))
summ_ex <- summarize_rtestimate(ex)
autoplot(summ_ex)
autoplot(summ_ex) + ggplot2::coord_cartesian(ylim = c(0, 2))

Create a new summary object

Description

Creates a new summary object for the summrt package while validating the input.

Usage

new_summrt(date, median, lb, ub, level, package, notes)

## S3 method for class 'summrt_summary'
print(x, ...)

Arguments

date

Integer vector. vector of index dates.

median

Double vector. vector of median values.

lb

Double vector. vector of lower bounds.

ub

Double vector. vector of upper bounds.

level

Double scalar. the confidence level associated with lb/ub

package

String. Name of the package.

notes

String. Notes about the summary.

x

An object of class summrt_summary.

...

Additional arguments passed to methods.

Value

A list of class summrt_summary. with the following components:

  • estimates: A tibble with the following columns:

    • date: Integer vector. vector of index dates.

    • median: Double vector. vector of median values.

    • lb: Double vector. vector of lower bounds.

    • ub: Double vector. vector of upper bounds.

  • level: Double scalar.

  • package: String. Name of the package.

  • notes: String. Notes about the summary.


Extract Rt estimation from a model fit

Description

Extract Rt estimation from a model fit

Usage

summarize_rtestimate(x, level = 0.95, ..., notes = "")

## Default S3 method:
summarize_rtestimate(x, level = 0.95, ..., notes = "")

## S3 method for class 'cv_poisson_rt'
summarize_rtestimate(
  x,
  level = 0.95,
  lambda = c("lambda.1se", "lambda.min"),
  ...,
  notes = "cv_poisson_rt"
)

## S3 method for class 'poisson_rt'
summarize_rtestimate(x, level = 0.95, lambda = NULL, ..., notes = "poisson_rt")

## S3 method for class 'epinow'
summarize_rtestimate(x, level = 0.95, ..., notes = "")

## S3 method for class 'estimate_R'
summarize_rtestimate(x, level = 0.95, ..., notes = "")

## S3 method for class 'Rt'
summarize_rtestimate(x, level = 0.95, ..., notes = "")

Arguments

x

Object to extract Rt from.

level

Confidence level for the confidence interval.

...

Additional arguments passed to methods.

notes

String. Optional notes to add to the summary.

lambda

The Poisson parameter (cv_poisson_rt).

Details

The estimate_R method is for the EpiEstim package. Currently, only levels in 50%, 90% and 95% confidence levels are allowed.

The Rt method is for the EpiLPS package.