| sw_trend | R Documentation |
This function generates a stepwise trend for a given period. No time trend is assumed in the first period.
sw_trend(cj, lambda, trend_mean, trend_var)
cj |
Period indicator. |
lambda |
Strength of time trend. |
trend_mean |
Integer. In case of random time trends, the strength of the time trend will be generated from N( |
trend_var |
Integer. In case of random time trends, the strength of the time trend will be generated from N( |
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.
Time trend in period c_j.
Marta Bofill Roig, Pavla Krotka
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.