Skip to contents

This function generates a stepwise trend for a given period. No time trend is assumed in the first period.

Usage

sw_trend(cj, lambda)

Arguments

cj

Period indicator.

lambda

Strength of time trend.

Value

Time trend in period \(c_j\).

Details

The time trend is generated according to the function \(f(j) = \lambda \cdot (c_j - 1)\), where \(c_j\) is an index of the period patient \(j\) was enrolled in.

Author

Marta Bofill Roig, Pavla Krotka