broken_line: Piecewise linear function

View source: R/utils.R

broken_lineR Documentation

Piecewise linear function

Description

For a given x, returns the value on a piecewise linear function as defined by vector b of its break points and associated values v. It is typically used for relative factor.for time-dependent parameters. For example: if n = 2, broken line returns below v values: t < t1: returns v1 t > t2: returns v2 t1 < t < t2: returns the line from (t1,v1) to (t2,v2)

Usage

broken_line(x, b, v)

phac-nml-phrsd/wem documentation built on June 6, 2024, 11:06 p.m.