Learn R Programming

VizTest (version 0.3)

make_diff_template: Make Template for Pairwise Significance Input

Description

Provides a template for producing a binary vector indicating whether each pair of estimates has a significant difference.

Usage

make_diff_template(
  estimates,
  include_zero = TRUE,
  include_intercept = FALSE,
  ...
)

Value

A two-column data frame containing the names of the larger and smaller parameters in the appropriate order. This can be used to identify the appropriate order in which to specify the sig_diffs argument to viztest().

Arguments

estimates

A vector of point estimates (ideally, a named vector).

include_zero

Logical indicating whether tests against zero should be included.

include_intercept

Logical indicating whether the intercept should be included.

...

Other arguments passed down, currently not implemented.

Details

The viztest() function uses a normal difference of means test to identify whether there is a significant difference or not. While this test could be done with adjustments for multiplicity or robust standard errors of all different kinds, there may be times when the user would prefer to identify the significant differences manually. The viztest() function internally reorders the estimates from largest to smallest so this function does that and then prints the pairs that will correspond with the visual testing grid search being done by viztest().

Please note that the include_zero and include_intercept arguments should be set the same here as they are in your call to viztest(). If they are not, viztest() will stop because the results from the comparison of confidence intervals will have different dimensions than the differences that are manually provides.

Examples

Run this code
make_diff_template(estimates = c(e1 = 2, e2 = 1, e3 = 3))

Run the code above in your browser using DataLab