time_series_plot: time series plot across different interventions

Description Usage Arguments Examples

View source: R/nof1.summary.R

Description

time series plot across different interventions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
time_series_plot(
  result,
  baseline.treat.name = NULL,
  plot.by.treat = T,
  overlay.with.model = F,
  predict.model = F,
  trial.start = NULL,
  trial.end = NULL,
  timestamp.format = NULL,
  ...
)

Arguments

result

Modeling result of class nof1.result produced by nof1.run.

baseline.treat.name

Name for reference treatment. Default is NULL.

plot.by.treat

Whether or not the measurements should be plotted in different panels by treatment. The default is T.

overlay.with.model

Whether or not the model prediction should be plotted. The default is F.

predict.model

Indicator for whether or not a prediction line should be plotted over the study period. Option when overlay.with.model = TRUE.

trial.start

Start time of the trial specified with timestamp.format.

trial.end

End time of the trial specified with timestamp.format.

timestamp.format

Format of the trial.start and trial.end.

Examples

1
2
3
4
5
6
7
8
Y <- laughter$Y
Treat <- laughter$Treat
nof1 <- nof1.data(Y, Treat, ncat = 11, baseline = "Usual Routine", response = "ordinal")
timestamp <- seq(as.Date('2015-01-01'),as.Date('2016-01-31'), length.out = length(Y))
time_series_plot(nof1,
                 timestamp = timestamp,
                 timestamp.format = "%m-%d-%Y",
                 Outcome.name = "Stress")

jiabei-yang/nof1ins documentation built on Sept. 7, 2021, 1:10 p.m.