generate.stat.dt: Construct a statistic distribution generated by permuting...

Description Usage Arguments Value

Description

Statistic is Wilcoxon-Mann-Whitney at the moment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
generate.stat.dt(
  data.dt,
  cluster.dt,
  sequence.dt,
  comparison.within = c("cluster", "period")[1],
  hypothetical.data.dt = NULL,
  perm.dt = NULL,
  max.r = 1000,
  sort.input = T,
  exclude.transition = T,
  stat.func = c(test.wilcox.dt, test.f.effect.dt)[[1]],
  progress.bar = T
)

Arguments

data.dt

data.table with columns participant, cluster, time, and outcome. Outcome should be continuous.

cluster.dt

data.table with the correspondence between cluster and sequence, with columns cluster and sequence.

sequence.dt

data.table with information about the sequences, with columns sequence, transition.time, and intervention.time.

comparison.within

Will comparisons be within cluster (i.e. between period), or within period (i.e. within cluster).

hypothetical.data.dt

Precalculated table of how outcomes would be assigned to groups if clusters were in each different sequence, will be generated if NULL (Default: NULL)

perm.dt

Precalculated table of how to permute clusters to sequences, with first column being clusters, and then one column for each permutation after that.

max.r

How many permutations?

sort.input

Will sort the input by outcome (by reference), which slightly speeds ranking

exclude.transition

boolean, should the result exclude data points from the transition period? (Default = T)

stat.func

What statistic will be used, there is a wilcox and f.effect as I'm writing this. (Default: Wilcox)

progress.bar

Display a progress bar. A little bit of overhead. Completion times will be echoed regardless.

...

Passed on to the test

Value

A data.table with the statistic value at each permutation (with zero as the unpermuted comparison).


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