Learn R Programming

CausalMetaR (version 0.1.2)

plot.STE_internal: Plot method for objects of class "STE_internal"

Description

This function creates forest plots of objects of class "STE_internal".

Usage

# S3 method for STE_internal
plot(
  x,
  use_scb = FALSE,
  header = c("Source", "Subgroup", ifelse(use_scb, "Estimate [95% SCB]",
    "Estimate [95% CI]")),
  source_names,
  subgroup_names,
  ...
)

Value

No value is returned.

Arguments

x

Object of class "STE_internal".

use_scb

logical scalar specifying whether the intervals in the forest plot should be simultaneous confidence bands (rather than confidence intervals). The default is FALSE.

header

optional, vector of character strings of length 3, headers for the source, effect modifier subgroup and the estimates in the forest plot.

source_names

optional, vector of character strings specifying the names of the sources. Defaults are the values in S provided by the user to STE_internal.

subgroup_names

optional, vector of character strings specifying the names of the effect modifier subgroups. Defaults are the values in EM provided by the user to STE_internal.

...

Other arguments, which are passed to forest.rma.

Details

Note that users may need to custom set the argument ilab.xpos which specifies the position (along the x-axis) of the effect modifier header and subgroup labels. See forest.rma for further details.

See Also

STE_internal

Examples

Run this code
# \donttest{
si <- STE_internal(
  X = dat_multisource[, 2:10],
  Y = dat_multisource$Y,
  EM = dat_multisource$EM,
  S = dat_multisource$S,
  A = dat_multisource$A,
  cross_fitting = FALSE,
  source_model = "MN.nnet",
  source_model_args = list(),
  treatment_model_type = "separate",
  treatment_model_args = list(
    family = binomial(),
    SL.library = c("SL.glmnet", "SL.nnet", "SL.glm"),
    cvControl = list(V = 5L)
  ),
  outcome_model_args = list(
    family = gaussian(),
    SL.library = c("SL.glmnet", "SL.nnet", "SL.glm"),
    cvControl = list(V = 5L)
  )
)
plot(si)
# }

Run the code above in your browser using DataLab