svy_mosaic_splom: Create a grid of 2x2 survey-weighted mosaic plots

Description Usage Arguments Value Examples

Description

Create a grid of 2x2 survey-weighted mosaic plots

Usage

1
2
svy_mosaic_splom(data, factors = c(), weight = "WEIGHT", svydesignObj,
  mar_par = rep(0.5, 4))

Arguments

data

a data frame

factors

a vector of character strings corresponding to factor-type variables from the data frame

weight

a character string indicating the name of the weight variable in the data frame.

svydesignObj

a survey::svydesign object, used to create bivariate ssurvey::svyglm models and color the corresponding mosaics red/blue if there is a statistically significant correlation between the two variables

mar_par

a numeric vector of length 4 controlling the margins of the plots

Value

A grid of 2x2 mosaics, one for each pair of the input factors

Examples

1
2
3
data(list = c("GES2013.drivers.design", "GES2013.drivers"))
factors <- c("DROWSY", "HEAVY_TRUCK",  "INT_HWY",  "SEX_IM", "SPEEDREL")
svy_mosaic_splom(data = GES2013.drivers, factors = factors, weight = "WEIGHT", svydesignObj = GES2013.drivers.design)

PatrickCoyle/analyzeGES documentation built on May 26, 2019, 4:38 p.m.