Package 'IPDMR'

Title: Support Code for the Introduction to Practical Disease Modelling Course
Description: What the package does (one paragraph).
Authors: Matt Denwood [aut, cre]
Maintainer: Matt Denwood <[email protected]>
License: GPL (>= 3)
Version: 0.2.1-1
Built: 2024-10-22 05:15:35 UTC
Source: https://github.com/ku-awdc/IPDMR

Help Index


Title

Description

Title

Usage

## S3 method for class 'ipdmr_dt'
autoplot(object, ...)

Arguments

...

An example function

Description

An example function

Usage

example_function(optional_argument = 42L)

Arguments

optional_argument

an argument with a default value

Examples

# Some example code:
df <- example_function()
df

Title

Description

Title

Usage

si_continuous(
  N = 10,
  beta = 0.05,
  type = c("frequency", "density"),
  init_I = 1,
  time_points = seq(0, 21, by = 0.1)
)

Arguments

time_points

Examples

si_continuous(N=10, type="density") |> ggplot2::autoplot()
si_continuous(N=10, type="frequency") |> ggplot2::autoplot()

Title

Description

Title

Usage

si_discrete(
  N = 10,
  beta = 0.05,
  type = c("frequency", "density"),
  init_I = 1,
  time_step = 1/24,
  max_time = 21
)

Arguments

init_I

Examples

si_discrete(N=10, type="density") |> ggplot2::autoplot()
si_discrete(N=10, type="frequency") |> ggplot2::autoplot()

Title

Description

Title

Usage

sirs_det(
  S = 99,
  I = 1,
  R = 0,
  beta = 0.25,
  gamma = 0.2,
  delta = 0.05,
  transmission_type = "frequency",
  time_step = 1L,
  max_time = 100L
)

Arguments

max_time

Title

Description

Title

Usage

sirs_stoc(
  S = 99,
  I = 1,
  R = 0,
  beta = 0.25,
  gamma = 0.2,
  delta = 0.05,
  iterations = 1,
  transmission_type = "frequency",
  time_step = 1L,
  max_time = 100L
)

Arguments

max_time

WithinGroupModel

Description

General within-group model class

Methods

Public methods


Method new()

Usage
WithinGroupModel$new(
  model_type = c("sirs"),
  update_type = c("deterministic", "stochastic"),
  transmission_type = c("frequency", "density"),
  time_step = 1L
)

Method update()

Usage
WithinGroupModel$update(time_step = self$time_step)

Method check_state()

Usage
WithinGroupModel$check_state()

Method run()

Usage
WithinGroupModel$run(
  n_steps,
  time_step = self$time_step,
  include_current = self$time == 0
)

Method clone()

The objects of this class are cloneable with this method.

Usage
WithinGroupModel$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.