vizByCovar: Generate figure for 'Viz by Covariate' tab

Description Usage Arguments Value See Also

View source: R/vizByCovar-plotFcn.R

Description

vizByCovar() is an internal function that generates a plot containing the covariate profile of a specified covariate.

Usage

1
2
vizByCovar(ds, covar0, VCPplotPts = TRUE, VCPplotLines = FALSE, col.outcome,
  col.trt, col.ITE, col.grp, cols.covars, cols.cts, cols.ctg, simData)

Arguments

ds

Any object that can be coerced into a data.frame, that contains data needed for plotting. This dataset is of a very specific structure, as defined within dataCompat().

covar0

A scalar integer, defining which column of the data set contains the covariate to be plotted.

VCPplotPts

A logical scalar. Should the plot include points?

VCPplotLines

A logical scalar. Should the plot include a connecting line?

col.outcome

A scalar integer, indicating the column of ds that contains the outcome.

col.trt

A scalar integer, indicating the column of ds that contains the (binary) treatment.

col.ITE

A scalar integer, indicating the column of ds that contains the estimated ITEs.

col.grp

A scalar integer, indicating the column of ds that contains the grouping indicator.

cols.covars

A integer vector, indicating the columns of ds that contain covariates (i.e., excluding treatment, outcome, grouping var, and estimated ITE (if provided)).

cols.cts

A integer vector, indicating the columns of ds that contain continuous variables (including the treatment and outcome variables, if applicable).

cols.ctg

A integer vector, indicating the columns of ds that contain polytomous variables (including the treatment and outcome variables, if applicable).

simData

A logical scalar, indicating whether the data is the simple simulated data (TRUE) or is more complex (FALSE).

Value

If both of the logical arguments are false, the output will be a plotly object containing an empty plot. Otherwise, the output will be a ggplot object containing the plot.

See Also

Other plotting functions: covarProfiles, forestPlotGen.fewGroups, forestPlotGen.manyGroups, forestPlot, groupQuantiles, subgroupProfiles, vizBySubgroup


sanoke/hetviz documentation built on March 4, 2020, 7:58 a.m.