bangdiwala_chart: Bangdiwala Chart

Description Usage Arguments Value References

View source: R/bangdiwala_chart.R

Description

A function for creating a Bangdiwala Chart. Constructed using "The agreement chart" by Shrikant I Bangdiwala. To learn more about Bangdiwala Chart, see http://www.stat.ncsu.edu/information/library/mimeo.archive/ISMS_1988_1859.pdf, and book: http://www.utdallas.edu/~pkc022000/agreement_book/ chapter 12: Categorical Data.

Usage

1
2
3
4
5
6
bangdiwala_chart(x, main = "", xlab = names(dimnames(x))[2],
  ylab = names(dimnames(x))[1], cat.label = colnames(x), las = TRUE,
  add.legend = TRUE, location.legend = "bottomright",
  add.B.hat = TRUE, location.B.hat = "topleft", add.x.margin = TRUE,
  add.y.margin = TRUE, ordinal.data = TRUE, col.line = "grey",
  lwd.line = 2, lty.line = 1)

Arguments

x

data as a table object in R. note: columns of x will turn into x-axis, rows of x will turn into y-axis, to reverse, use t() function (i.e., transpose).

main

title of plot.

xlab

title of x-axis (default: extracted from x).

ylab

title of y-axis (default: extracted from x).

cat.label

category labels (default: extracted from x).

las

y-axis category labels rotated.

add.legend

'TRUE/FALSE', add a legend to the plot.

location.legend

either 'bottomright' or 'topleft' (only relevant if 'add.legend=TRUE').

add.B.hat

'TRUE/FALSE', add Bangdiwala agreement measure to plot, (otherwise it is only given as the function's output), (agreement measure without weights).

location.B.hat

either 'bottomright' or 'topleft' (only relevant if 'add.B.hat=TRUE').

add.x.margin

'TRUE/FALSE', add marginal values for columns (x) to plot.

add.y.margin

'TRUE/FALSE', add marginal values for columns (y) to plot.

ordinal.data

'TRUE/FALSE', if 'TRUE', partial agreement squares are added.

col.line

color of line (default: 'firebrick').

lwd.line

width of line (default: '2').

lty.line

type of line ('solid', 'dotted', etc.; default: 'solid').

Value

A chart, and Bangdiwala agreement measure

References

Bangdiwala, S. I. (1988). The Agreement Chart. Department of Biostatistics, University of North Carolina at Chapel Hill, Institute of Statistics Mimeo Series No. 1859, http://www.stat.ncsu.edu/information/library/mimeo.archive/ISMS_1988_1859.pdf

David Meyer, Achim Zeileis, and Kurt Hornik (2017). vcd: Visualizing Categorical Data. R package version 1.4-4.

Choudhary, P. K. and Nagaraja, H. N. (2017). Measuring Agreement: Models, Methods, and Applications, Wiley.

Westlund, K. B. and Kurland, L. T. (1953). Studies on multiple sclerosis in Winnipeg, Manitoba, and New Orleans, Louisiana I. Prevalence; comparison between the patient groups in Winnipeg and New Orleans. American Journal of Hygiene 57, 380–396.


hongbo-yang/BangdiwalaChart documentation built on Dec. 24, 2019, 2:55 a.m.