iplotC: Interaction plot

Description Usage Arguments Value Examples

View source: R/iplotC.r

Description

Interaction plot uses brkdn.plot in plotrix package and svyby function from survey package. Warnings suppressed so the function creates plot without generating intermediate results used to create plot.

Usage

1
iplotC(function1 = NULL, function2 = NULL, data, function3 = NULL, ...)

Arguments

function1

A function in the form ~depvar

function2

A function. Here indepvar is typed before controlvar: ~indepvar + controlvar

data

Design dataset (e.g. nesD, gssD, statesD, or worldD)

function3

A function. Here indepvar is typed after controlvar: ~controlvar + indepvar

...

Further arguments to be passed to brkdn.plot function (plotrix package)

Value

No value returned

Examples

1
2
3
4
5
6
7
8
   library(poliscidata)
   
   iplotC(function1 = ~ ft_dem, function2 = ~ gender + married, 
          data = nesD, function3 = ft_dem ~ married + gender)
   
   iplotC(~ft_dem, ~gender+married, nesD, ft_dem~married+gender,
          xlab="Gender", ylab="Democratic Party Rating", 
          main="Democratic Party Rating by Gender and Marital Status")

Example output



poliscidata documentation built on July 8, 2020, 6:23 p.m.