piecewise_xy | R Documentation |
Given the vectors (breaks[1],...,breaks[n])
and the list of IBMPopSim
compatible
functions funs = (f[0],f[1],...,f[n])
(one value more!), piecewise_xy(breaks, funs)
returns
the function
f(x,y) = f_0(x) {1}_{y\le breaks[1]}+\sum_{k=1}^{n-1} f_k(x) {1}_{[breaks_{k}, breaks_{k+1})}(y) + f_n(x){1}_{y \ge breaks[n]}
piecewise_xy(breaks, funs)
breaks |
Numeric vector giving the breaks of functions given in |
funs |
List of functions. |
A C++ version of this function is available. See vignette('IBMPopSim_cpp')
for more details.
Piecewise bivariate function built with the given intervals and functions.
time_dep_function <- piecewise_xy(c(5),
list(gompertz(0.1, 0.005), gompertz(0.08, 0.005)))
time_dep_function(0, 65) # death intensity at time 0 and age 65.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.