plot,ihwResult,ANY-method {IHW} | R Documentation

## Plot functions for IHW

### Description

See the vignette for usage examples.

### Usage

    ## 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

       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)

[Package IHW version 1.14.0 Index]