plot-ihwResult-ANY-method: Plot functions for IHW

Description Usage Arguments Value Examples

Description

See the vignette for usage examples.

Usage

1
2
3
4
## S4 method for signature 'ihwResult,ANY'
plot(x, x_axis = c(weights = "group",
  decisionboundary = "covariate")[what], what = "weights",
  scale = covariate_type(x))

Arguments

x

Object of class ihwResult

x_axis

Character: "group" or "covariate". Default is "group" if "what" is "weights", and "covariate" if "what" is "decisionboundary".

what

Character: "weights" or "decisionboundary"

scale

Character: "ordinal" or "nominal"

Value

A ggplot2 object.

Examples

1
2
3
4
5
6
7
8
   save.seed <- .Random.seed; set.seed(1)
   X   <- runif(20000, min = 0.5, max = 4.5) # covariate
   H   <- rbinom(20000, 1, 0.1)              # hypothesis true or false
   Z   <- rnorm(20000, H*X)                  # z-score
   .Random.seed <- save.seed
   pvalue <- 1-pnorm(Z)                      #pvalue
   ihw_res <- ihw(pvalue, X, .1)
   plot(ihw_res)

IHW documentation built on Nov. 8, 2020, 7:44 p.m.