Depth versus depth plot

Share:

Description

Produces a DD plot which allows to compare two multivirate datasets or to compare a subject dataset with theoretical distribution.

Usage

 1 2 ddPlot(x, y, scale = FALSE, location = FALSE, name_x = "X", name_y = "Y", title = "Depth vs. depth plot", ...) 

Arguments

 x The first or only data sample for ddPlot. y The second data sample. x and y must be of the same space. scale logical. determines whether the dispersion is to be aligned. location determines whether the location is to be aligned to 0 vector with depth median. name_x name for data set x. It will be passed to drawing function. name_y name for data set y. title title of the plot. ... Parameters passed to depth function

Details

For two probability distributions F and G , both in {{{R}}^{d}} , we can define depth vs. depth plot being very useful generalization of the one dimensional quantile-quantile plot:

DD(F,G)=≤ft\{ ≤ft( D({z},F),D({z},G) \right),{z}\in {{{R}}^{d}} \right\}

Its sample counterpart calculated for two samples {{{X}}^{n}}=\{{{X}_{1}},.,{{X}_{n}}\} from F , and {{Y}^{m}}=\{{{Y}_{1}},...,{{Y}_{m}}\} from G is defined as

DD({{F}_{n}},{{G}_{m}})=≤ft\{ ≤ft( D({z},{{F}_{n}}),D({z},{{G}_{m}}) \right),{z}\in \{{{{X}}^{n}}\cup {{{Y}}^{m}}\} \right\}

Author(s)

Daniel Kosiorowski, Mateusz Bocian, Anna Wegrzynkiewicz and Zygmunt Zawadzki from Cracow University of Economics.

References

Liu, R.Y., Parelius, J.M. and Singh, K. (1999), Multivariate analysis by data depth: Descriptive statistics, graphics and inference (with discussion), Ann. Statist., 27, 822–831.

Liu, R.Y., Singh K. (1993), A Quality Index Based on Data Depth and Multivariate Rank Test, Journal of the American Statistical Association vol. 88.

Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 require(sn) require(mvtnorm) # EXAMPLE 1: Location difference standard = mvrnorm(1000, c(0,0), diag(2)) shift = mvrnorm(1000, c(0.5, 0), diag(2)) ddPlot(x = standard, y = shift, title = "Difference in position") ddPlot(x = standard, y = shift, location = TRUE, title = "Location aligned") ## EXAMPLE 2: Scale difference standard <- mvrnorm(1000, c(0,0), diag(2)) scale <- mvrnorm(1000, c(0,0), 4*diag(2)) ddPlot(x=standard, y=scale) ddPlot(x=standard, y=scale, scale=TRUE) 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.22719912230968475, "perplexity": 12650.964979751881}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-50/segments/1480698542693.41/warc/CC-MAIN-20161202170902-00400-ip-10-31-129-80.ec2.internal.warc.gz"}