| total | R Documentation |
Sum of the Present Value, by time at which the calculation is performed (tzero input to dynpv())
total(df)
df |
Tibble of class "dynpv" created by |
The Present Value of a cashflow p_k for the u_j patients who began treatment at time j and who are in their kth timestep of treatment is as follows
PV(j,k,l) = u_j \cdot p_k \cdot R_{j+k+l-1} \cdot (1+i)^{2-j-k}
where i is the risk-free discount rate per timestep, p_k is the cashflow amount in today’s money, and p_k \cdot R_{j+k+l-1} is the nominal amount of the cashflow at the time it is incurred, allowing for an offset of l = tzero.
The total present value by time at which the calculation is performed, TPV(l), is therefore the sum of PV(j,k,l) over all j and k within the time horizon T, namely:
TPV(l) = \sum_{j=1}^{T} \sum_{k=1}^{T-j+1} PV(j,k, l) \\
\;
= \sum_{j=1}^{T} \sum_{k=1}^{T-j+1} u_j \cdot p_k \cdot R_{l+j+k-1} \cdot (1+i)^{2-j-k}
A number or tibble
dynpv(), futurepv()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.