TippingPoint.default: Default method for TippingPoint

View source: R/TippingPoint.R

TippingPoint.defaultR Documentation

Default method for TippingPoint

Description

The default method for enhanced tipping point displays.

Usage

## Default S3 method:
TippingPoint(
  outcome,
  treat,
  group.infor = FALSE,
  plot.type = c("estimate", "p.value", "both"),
  summary.type = c("density", "credible.region", "convex.hull"),
  alpha = 0.95,
  HistMeanT = NULL,
  HistMeanC = NULL,
  ind.values = FALSE,
  impValuesT = NA,
  impValuesC = NA,
  impValuesColor = NA,
  show.points = TRUE,
  point.size = 1,
  point.shape = 19,
  S = 3,
  n.grid = 150,
  ...
)

Arguments

outcome

A numeric vector of the outcomes, a binary or continuous outcome.

treat

A (non-NA) numeric vector of treatment group.

group.infor

A logical, whether to display the group information.

plot.type

A character, one of "estimate", "p.value" or "both" indicating which one should be represented by a heat-map layer.

summary.type

A character, how to summarize the joint posterior distribution of imputed outcomes for treated and controls, one of "density", "credible.region" or "convex.hull". see geom_density2d, mahalanobis, geom_polygon, credible.region for more details.

alpha

A numeric between 0-1, with alpha of points in Convex hull, 1-alpha removed by Machalanobis distance. It also specifies the probabilities for credible regions used in credible.region, in this case, alpha should be above 0.5 and below 1. The default value is 0.95.

HistMeanT

A numeric vector or NULL, historical values or proportions for the treatment group.

HistMeanC

A numeric vector or NULL, historical values or proportions for the control group.

ind.values

A logical, whether or not to display values in heat-map layer.

impValuesT

NA or imputed values for the treatment group, see imputedata for more details.

impValuesC

NA or imputed values for the control group, see imputedata for more details.

impValuesColor

NA or imputed colors correspond to the columns in impValuesT or impValuesC. The default colors are from Set1 in RColorBrewer allowing up to 9. Specify explicitly if need more colors. See display.brewer.all for more colors.

show.points

A logical, whether to show the points for imputed values.

point.size

Size of points for imputed values.

point.shape

Shape of points for imputed values.

S

A integer indicating range of plotting, the default value is 3.

n.grid

A integer, number of points in the grid, only for continuous case, the default is 150.

...

Additional arguments

See Also

TippingPoint, TippingPoint.formula.

Examples

#  See more details in vignette using:
#  vignette("TippingPoint")
TippingPoint(outcome=tippingdata$binary,treat= tippingdata$treat,
 plot.type = "p.value",ind.values = TRUE,
 impValuesT  = imputedata[,c("MAR_T2","MCAR_T2")],
 impValuesC = imputedata[,c("MAR_C2","MCAR_C2")],
 impValuesColor = RColorBrewer::brewer.pal(8,"Accent")[c(4,6)],
 summary.type = "credible.region", alpha = 0.95,
 S=1.5, n.grid = 100, HistMeanT = c(0.38,0.4), HistMeanC =  c(0.2,0.55))

TippingPoint documentation built on April 8, 2022, 5:08 p.m.