TippingPoint.default | R Documentation |
The default method for enhanced tipping point displays.
## 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, ... )
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 |
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 |
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 |
impValuesC |
NA or imputed values for the control group, see |
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 |
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 |
TippingPoint
, TippingPoint.formula
.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.