ctmaPlot: ctmaPlot

View source: R/ctmaPlot.R

ctmaPlotR Documentation

ctmaPlot

Description

Forest plot, funnel plots, plots of discrete time cross-lagged and autoregressive effect, and plots of required sample sizes

Usage

ctmaPlot(
  ctmaFitObject = NULL,
  activeDirectory = NULL,
  saveFilePrefix = "ctmaPlot",
  activateRPB = FALSE,
  plotCrossEffects = TRUE,
  plotAutoEffects = TRUE,
  timeUnit = "timeUnit (not specified)",
  timeRange = c(),
  yLimitsForEffects = c(),
  mod.number = 1,
  mod.values = -2:2,
  aggregateLabel = "",
  xLabels = NULL,
  undoTimeScaling = TRUE,
  ...
)

Arguments

ctmaFitObject

'CoTiMA' Fit object

activeDirectory

defines another active directory than the one used in ctmaInitFit

saveFilePrefix

Prefix used for saved plots

activateRPB

set to TRUE to receive push messages with 'CoTiMA' notifications on your phone

plotCrossEffects

logical

plotAutoEffects

logical

timeUnit

label for x-axis when plotting discrete time plots

timeRange

vector describing the time range for x-axis as sequence from/to/stepSize (e.g., c(1, 144, 1))

yLimitsForEffects

range for y-axis

mod.number

moderator number that should be used for plots

mod.values

moderator values that should be used for plots

aggregateLabel

label to indicate aggregated discrete time effects

xLabels

labes used for x-axis

undoTimeScaling

if TRUE, the original time scale is used (timeScale argument possibly used in ctmaInit is undone )

...

arguments passed through to plot()

Value

depending on the CoTiMA fit object supplied, generates funnel plots, forest plots, discrete time plots of autoregressive and cross-lagged effects, plots of required samples sizes across a range of discrete time intervals to achieve desired levels of statistical power, and post hoc power of primary studies. Plots are saved to disk.

Examples

## Not run: 
# cannot run without proper activeDirectory specified. Adapt!
CoTiMAFullFit_3$activeDirectory <- "/Users/tmp/" # adapt!
plot(ctmaFitList(CoTiMAInitFit_3, CoTiMAFullFit_3),
     timeUnit="Months", timeRange=c(1, 144, 1),
     plotAutoEffects=FALSE)

## End(Not run)

## Not run: 
# cannot run without proper activeDirectory specified. Adapt!
CoTiMABiG_D_BO$activeDirectory <- "/Users/tmp/" # adapt!
plot(CoTiMABiG_D_BO)

## End(Not run)


CoTiMA documentation built on Nov. 10, 2022, 5:16 p.m.

Related to ctmaPlot in CoTiMA...