Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotTab

graphical comparison of the estimated distributions for the same continuous variable.


Description

Compares graphically the estimated distributions for the same categorical variable(s) using data coming from two different data sources.

Usage

plotTab(data.A, data.B, xlab.A, xlab.B=NULL, w.A=NULL, w.B=NULL)

Arguments

data.A

A dataframe or matrix containing the variable of interest xlab.A and eventual associated survey weights w.A.

data.B

A dataframe or matrix containing the variable of interest xlab.B and eventual associated survey weights w.B.

xlab.A

Character string providing the name(s) of one or more variables in data.A whose (joint) distribution should be represented graphically and compared with that estimated from data.B.

xlab.B

Character string providing the name(s) of one or more variables in data.A whose (joint) distribution should be represented graphically and compared with that estimated from data.A. If xlab.B=NULL (default) then it assumed xlab.B=xlab.A.

w.A

Character string providing the name of the optional weighting variable in data.A that, in case, should be used to estimate the distribution of xlab.A

w.B

Character string providing the name of the optional weighting variable in data.B that, in case, should be used to estimate the distribution of xlab.B

Details

This function compares graphically the (joint) distribution of the same variables but estimated from data coming from two different data sources. The graphical comparison is done using barcharts.

Value

The required graphical representation is drawn using the ggplot2 facilities.

Author(s)

Marcello D'Orazio mdo.statmatch@gmail.com

See Also

Examples

# plotTab(data.A = samp.A, data.B = samp.B, xlab.A="edu7", w.A = "ww")
# plotTab(data.A = samp.A, data.B = samp.B, xlab.A=c("urb", "sex"), w.A = "ww", w.B="ww")

StatMatch

Statistical Matching or Data Fusion

v1.4.0
GPL (>= 2)
Authors
Marcello D'Orazio
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.