powered by
Plot a grid of x y plots showing how a third confounding variable 'z' changes the slope
# S3 method for confound.grid plot(x, Y='y', X='x', confounder='z', breaks=3, mains='breaks',...)
a confound grid plot
a data frame
the name of the column with the dependent/outcome variable
the name of the column with the predictor variable
the name of the column with confounding variable
number or vector of breaks to split the plots horizontally (across x)
a vector plot title strings; defaults to the continuous->categorical break levels of 'confounder'
other arguments passed to 'plot'
# Swiss fertility confounding example plot.confound.grid(x=swiss, "Infant.Mortality", "Fertility" , "Education", breaks=4)
Run the code above in your browser using DataLab