Learn R Programming

adaplots (version 0.1.0)

udaplot: Creates Uda-plot for the provided data with and without the estimated normal density curve, excluding extreme values.

Description

Uda-plot can be utilized to assess normality.

Usage

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

Value

Uda-plot

Arguments

X

an \(n\) by \(1\) matrix, equivalently, a column vector of length \(n\), where \(n\) is the number of observations.

excld

exclude extreme values in the data applying 1.5IQR rule, FALSE by default.

npdf

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

title

title of the plot, Uda-plot by default and Uda-plot & Normal Density Curve if npdf is TRUE.

xlab

\(x\)-axis label, \(x\) by default.

lcol

color of the points which correspond to data on or below the sample average, black by default.

rcol

color of the points which correspond to data above the sample average, grey60 by default.

pdfcol

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

...

other graphical parameters.

References

Wijesuriya, U. A. (2025a). Ada-plot and Uda-plot as Alternatives for Ad-plot and Ud-plot. Communications in Statistics-Theory and Methods, tools:::Rd_expr_doi("10.1080/03610926.2025.2558108").

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

Wijesuriya, U. A. (2025c). adplots: Ad-plot and Ud-plot for Visualizing Distributional Properties and Normality. R Package Version 0.1.0, tools:::Rd_expr_doi("10.32614/CRAN.package.adplots").

Examples

Run this code
   set.seed(0)
   X1 <- matrix(c(rnorm(50, mean = 2, sd = 5), runif(4, 17, 30)))
   udaplot(X1)

   X2 <- matrix(c(rnorm(50, mean = 2, sd = 5), runif(4, 17, 30)))
   udaplot(X2, npdf = TRUE)

   X3 <- matrix(c(rnorm(50, mean = 2, sd = 5), runif(4, 17, 30)))
   udaplot(X3, excld = TRUE, npdf = TRUE)

   X4 <- matrix(rnorm(500, mean = 2, sd = 5))
   udaplot(X4, title = "", lcol = "blue", rcol = "red", pdfcol = "balck")

Run the code above in your browser using DataLab