This function generates a time trend for given time points in the trial according to a linear function.
linear_trend(j, lambda, sample_size)Time trend for time points j.
Time points for which the trend should be generated.
Strength of time trend.
Vector of dimension 2, indicating sample size in the trial period until the time trend starts and the remaining sample size.
Marta Bofill Roig, Pavla Krotka
The time trend is generated according to the function \(f(j) = \lambda \cdot \frac{j-1}{N-1}\), where \(N\) is the total sample size.