reserve {lifepack} | R Documentation |
Reserve This function calculates the reserve given the reward matrix and some constant rate This function requires proper construction of reward matrix as specified in the lecture notes provided in the course Liv1 at the University of Copenhagen.
Description
Reserve This function calculates the reserve given the reward matrix and some constant rate This function requires proper construction of reward matrix as specified in the lecture notes provided in the course Liv1 at the University of Copenhagen.
Usage
reserve(t, TT, Lambda, R, mu, r, n)
Arguments
t |
initial timepoint |
TT |
end timepoint |
Lambda |
intensity matrix |
R |
reward matrix |
mu |
equivalence premium |
r |
constant rate as a scalar |
n |
number of steps for the Runge-Kutta algorithm |
Value
Returns a matrix of statewise reserves
Examples
Lambda <- function(x) matrix(c(-0.1, 0.1, 0, -0.1), 2, 2)
R <- function(x, mu) matrix(c(0, 0, 0, mu), 2, 2)
reserve(0, 80, Lambda, R, 200000, 0.01, 1000)
[Package lifepack version 0.1.0 Index]