splineIDD | R Documentation |
IDD transmissibility curve using a spline basis
splineIDD(x, params, XBasis, getParams = F)
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 |
XBasis |
Basis matrix. Generally the output from something such as |
getParams |
logical. Tells the function to return the parameter names. |
The spline IDD curve is exponentiated to ensure f(x) > 0
exp(XBasis %*% b)
, where b = c(params$b1, params$b2, ...)
splineIDD(1:15, params = list(b1 = 3, b2 = 1, b3 = -3), XBasis = splines::bs(1:15, df = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.