generate.confound.interventions.parameters.dt: Generates a table of confounding interventions (e.g. those...

Description Usage Arguments Value

View source: R/simulate.helpers.R

Description

Generates a table of confounding interventions (e.g. those from other interventions or such). There can be a potentially random number of confounding interventions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
generate.confound.interventions.parameters.dt(
  cluster.dt,
  min.time = 0,
  max.time = 0,
  n.confound.intervention.mean = 5,
  n.confound.intervention.sd = 1,
  confound.intervention.transition.duration.mean = 5,
  confound.intervention.transition.duration.sd = 0.6,
  confound.intervention.mean = 0.7,
  confound.intervention.sd = 0.1,
  n.to.generate = 1
)

Arguments

cluster.dt

A study info data.table, containing data about clusters.

min.time

Earliest time of a random effect (Default: 0)

max.time

Latest time of a random effect (Default: 0)

n.confound.intervention.mean

How many random effects total, mean parameter for rnorm (Default: 5)

n.confound.intervention.sd

How many random effects total, sd parameter for rnorm (Default: 1)

confound.intervention.transition.duration.mean

Variance of time taken for transition of effect between random effects (Default: 5)

confound.intervention.mean

Mean random effect (Default: 0.7)

confound.intervention.sd

Variance of the random effects (Default: 0.1)

n.to.generate

Integer how many different effects to generate. If more than one, an integer column will be added (sim.number) to delineate. (Default: 1)

Value

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


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