sum_by_coh: Present value for each uptake cohort and calculation time

View source: R/oop.R

sum_by_cohR Documentation

Present value for each uptake cohort and calculation time

Description

Calculates the sum of the Present Value by uptake cohort (j) and time at which the calculation is performed (tzero input to dynpv())

Usage

sum_by_coh(df)

Arguments

df

Tibble of class "dynpv" created by dynpv() or futurepv()

Details

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.

This method returns \sum_{k=1}^{T-j+1} PV(j,k,l) for each value of j and l, where T is the time horizon of the calculation.

Value

A number or tibble

See Also

dynpv(), futurepv()


dynamicpv documentation built on Jan. 16, 2026, 1:07 a.m.