Package 'adplots'

Title: Ad-Plot and Ud-Plot for Visualizing Distributional Properties and Normality
Description: The empirical cumulative average deviation function introduced by the author is utilized to develop both Ad- and Ud-plots. The Ad-plot can identify symmetry, skewness, and outliers of the data distribution, including anomalies. The Ud-plot created by slightly modifying Ad-plot is exceptional in assessing normality, outperforming normal QQ-plot, normal PP-plot, and their derivations. The d-value that quantifies the degree of proximity between the Ud-plot and the graph of the estimated normal density function helps guide to make decisions on confirmation of normality. Full description of this methodology can be found in the article by Wijesuriya (2025) <doi:10.1080/03610926.2024.2440583>.
Authors: Uditha Amarananda Wijesuriya [aut, cre]
Maintainer: Uditha Amarananda Wijesuriya <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2025-03-01 07:56:51 UTC
Source: CRAN

Help Index


Creates Ad-plot for the provided data.

Description

Ad-plot identifies the characteristics of the distribution such as symmetry, skewness, and outliers of the data set.

Usage

adplot(X, title = "Ad-plot", xlab = "x", lcol = "black", rcol = "grey60", ...)

Arguments

X

an nn by 11 matrix, equivalently, a column vector of length nn, where nn is the number of observations.

title

title of the plot, Ad-plot by default.

xlab

xx-axis label, xx by default.

lcol

color of the points corresponding to the data that are less than or equal to the sample average, black by default.

rcol

color of the points corresponding to the data that are greater than the sample average, grey60 by default.

...

other graphical parameters.

Value

Ad-plot

References

Wijesuriya, U. A. (2025). Ad-plot and Ud-plot for Determining Distributional Characteristics and Normality. Communications in Statistics-Theory and Methods, doi:10.1080/03610926.2024.2440583.

Examples

set.seed(0)
   X1 <- matrix(rnorm(50, mean = 2, sd = 5))
   adplot(X1)

   X2 <- matrix(rf(50, df1 = 10, df2 = 5))
   adplot(X2)

   X3 <- matrix(rbeta(50, shape1 = 10, shape2 = 2))
   adplot(X3, title="", lcol = "blue", rcol = "red")

Creates Ud-plot for the provided data excluding and including the estimated normal density curve.

Description

Ud-plot developed by a slight modification of Ad-plot can be utilized to assess normality.

Usage

udplot(X, npdf = FALSE, title = ifelse(npdf == FALSE, "Ud-plot",
       "Ud-plot & Normal Density Curve"), xlab = "x", lcol = "black",
       rcol = "grey60", pdfcol = "red", ...)

Arguments

X

an nn by 11 matrix, equivalently, a column vector of length nn, where nn is the number of observations.

npdf

display of the estimated normal density curve in the Ud-plot, FALSE by default.

title

title of the plot, Ud-plot by default and Ud-plot & Normal Density Curve otherwise.

xlab

xx-axis label, xx by default.

lcol

color of the points corresponding to the data that are less than or equal to the sample average, black by default.

rcol

color of the points corresponding to the data that are greater than the sample average, grey60 by default.

pdfcol

color of the estimated normal density curve, red by default.

...

other graphical parameters.

Value

Ad-plot

References

Wijesuriya, U. A. (2025). Ad-plot and Ud-plot for Determining Distributional Characteristics and Normality. Communications in Statistics-Theory and Methods, doi:10.1080/03610926.2024.2440583.

Examples

set.seed(0)
   X1 <- matrix(rnorm(50, mean = 2, sd = 5))
   udplot(X1)

   X2 <- matrix(rnorm(50, mean = 2, sd = 5))
   udplot(X2, npdf = TRUE)

   X3 <- matrix(rnorm(500, mean = 2, sd = 5))
   udplot(X3, npdf = TRUE, title = "", lcol = "blue", rcol = "red", pdfcol = "black")