splineIDD: IDD transmissibility curve using a spline basis

View source: R/iddFun.R

splineIDDR Documentation

IDD transmissibility curve using a spline basis

Description

IDD transmissibility curve using a spline basis

Usage

splineIDD(x, params, XBasis, getParams = F)

Arguments

x

A vector ranging from 1 to the maximum length of the infectious period.

params

A list giving coefficients for each basis in the basis matrix, named as b1, b2, ...

XBasis

Basis matrix. Generally the output from something such as splines::bs().

getParams

logical. Tells the function to return the parameter names.

Details

The spline IDD curve is exponentiated to ensure f(x) > 0

Value

exp(XBasis %*% b), where b = c(params$b1, params$b2, ...)

Examples

splineIDD(1:15, params = list(b1 = 3, b2 = 1, b3 = -3),
                XBasis = splines::bs(1:15, df = 3))

ceward18/BayesSEIR documentation built on June 15, 2022, 11:06 a.m.