generate.linear.effect: Generate a difference that varies linearly over time....

Description Usage Arguments Value

View source: R/simulate.helpers.R

Description

Generate a difference that varies linearly over time. Transition times can be equal, in which case there will be no transition (see generate.step.effect). If both are zero, it is effectively a flat difference applied at every time point (see generate.flat.effect).

Usage

1
2
3
4
5
6
generate.linear.effect(
  time.vector,
  diff.amplitude = 1,
  transition.start.time = 0,
  transition.end.time = 0
)

Arguments

time.vector

A numeric vector of time values

diff.amplitude

The numeric amplitude of the difference (Default: 1)

transition.start.time

When does the effect start, will not be applied if NA. (Default: 0)

transition.end.time

When does the effect end, will not be applied if NA. (Default: 0)

Value

A numeric vector containing the effect at each provided time point.


mattmoo/SteppedWedgeAnalysis documentation built on Jan. 14, 2020, 12:25 a.m.