plot.confound.grid: Plot a grid of x y plots split by a confounder z

View source: R/plots.R

plot.confound.gridR Documentation

Plot a grid of x y plots split by a confounder z

Description

Plot a grid of x y plots showing how a third confounding variable 'z' changes the slope

Usage

## S3 method for class 'confound.grid'
plot(x, Y='y', X='x', confounder='z', breaks=3, mains='breaks',...)

Arguments

x

a data frame

Y

the name of the column with the dependent/outcome variable

X

the name of the column with the predictor variable

confounder

the name of the column with confounding variable

breaks

number or vector of breaks to split the plots horizontally (across x)

mains

a vector plot title strings; defaults to the continuous->categorical break levels of 'confounder'

...

other arguments passed to 'plot'

Value

a confound grid plot

Examples


# Swiss fertility confounding example
plot.confound.grid(x=swiss, "Infant.Mortality", "Fertility" , "Education", breaks=4)



caroline documentation built on Oct. 21, 2024, 9:06 a.m.