cost_at_right_time: Allow assignment of a cost at a particular cycle or age

Description Usage Arguments Details Value Examples

View source: R/convenience.R

Description

Allow assignment of a cost at a particular cycle or age

Usage

1
cost_at_right_time(cost, age, cycle, at_age, at_cycle)

Arguments

cost

cost, in units when incurred

age

age at a given cycle

cycle

the cycle

at_age

at what age should the cost be incurred?

at_cycle

in what cycle should cost be incurred?

Details

intended for use in parameters object for heemod models.

Value

0 except when the age or cycle condition is met; cost when at least one condition is met.

Examples

1
2
cost_at_right_time(500, age = 1:20, at_age = 10)
cost_at_right_time(500, cycle = 1:20, at_cycle = 10)

MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.