ggplot.niv: Net weight of evidence plots from a 'niv' object.

View source: R/niv.R

ggplot.nivR Documentation

Net weight of evidence plots from a ‘niv’ object.

Description

ggplot method for class niv.

Usage

## S3 method for class 'niv'
ggplot(x, i.var = NULL, same.limits = FALSE, col = NULL,
  xlab = NULL, ylab = NULL, title = NULL, nrows = NULL, ncols = NULL)

Arguments

x

An object of class niv.

i.var

A numeric vector of indices of the variables to plot. The variables should be indexed in the same order that they appear in the initial niv formula. The default is to plot all variables.

same.limits

Should limits for the y-axis be the same in all plots?

col

The fill colour of the bars.

xlab

A character string giving the title for the x axis (the length should be the same as the number of plots).

ylab

A character string of length 1 giving the title for the y axis.

title

The main title for the plot (the length should be the same as the number of plots).

nrows

Number of rows for plots.

ncols

Number of columns for plots.

Author(s)

Leo Guelman leo.guelman@gmail.com

Examples

set.seed(1)
df <- sim_uplift(n = 1000, p = 20, response = "binary")
netInf <- niv(y ~ trt(T) + X1 + X2 + X9 + X10, data = df,
             B=10, parallel = FALSE, digitsB = 1)
ggplot(netInf)

leoguelman/uplift2 documentation built on April 15, 2022, 4:34 a.m.