| Title: | Multivariate Analogy of Quantiles |
|---|---|
| Description: | Could be used to obtain spatial depths, spatial ranks and outliers of multivariate random variables. Could also be used to visualize DD-plots (a multivariate generalization of QQ-plots). |
| Authors: | Omker Mahalanobish [aut], Somedip Karmakar [cre, aut] |
| Maintainer: | Somedip Karmakar <[email protected]> |
| License: | GPL-2 |
| Version: | 0.1 |
| Built: | 2026-05-18 07:09:01 UTC |
| Source: | https://github.com/cran/depth.plot |
dd.plot is a multivariate genralization of a normal QQ-plot.
It produces a DD-plot of two datasets.
dd.plot(data1, data2 = rmvnorm(nrow(data1), array(0, ncol(data1)), diag(1, ncol(data1), ncol(data1))), main = "Normal DD-plot", xlab = "Sample Depths", ylab = "Normal Depths", col = "black", pch = 20)dd.plot(data1, data2 = rmvnorm(nrow(data1), array(0, ncol(data1)), diag(1, ncol(data1), ncol(data1))), main = "Normal DD-plot", xlab = "Sample Depths", ylab = "Normal Depths", col = "black", pch = 20)
data1 |
A matrix or a data.frame with each row as a p-variate observation. |
data2 |
A matrix or a data.frame (defaults to a standard independent p-variate normal). |
main |
Plot labels. The title of the plot. |
xlab |
Plot labels. The |
ylab |
Plot labels. The |
col |
The color of the points |
pch |
character string or vector of 1-characters or integers for plotting characters. |
A DD-plot of the input data
Somedip Karmakar <[email protected]>
Omker Mahalanobish <[email protected]>
u<-matrix(rnorm(300,1,4),ncol=3) dd.plot(u)u<-matrix(rnorm(300,1,4),ncol=3) dd.plot(u)
Used to compute the p-variate quantile of a p-variate observation with respect to a p-variate data cloud.
multi.quant(x, data)multi.quant(x, data)
x |
A numeric p-variate |
data |
A matrix or a data.frame with each row as a p-variate observation. |
The xth mutivariate quantile with respect to data.
Somedip Karmakar <[email protected]>
Omker Mahalanobish <[email protected]>
u<-matrix(rnorm(90,0,1),ncol=3) u0<-runif(3,0,1) multi.quant(spatial.rank(u0,u),u)u<-matrix(rnorm(90,0,1),ncol=3) u0<-runif(3,0,1) multi.quant(spatial.rank(u0,u),u)
spatial.depth is used to find the spatial depth of one or more p-variate observation(s) in a data cloud of numerous p-variate observations.
spatial.depth(x, data)spatial.depth(x, data)
x |
A matrix or a data.frame of objects (numerical vector as one object) whose depth is to be found; each row consists a p-variate observation. |
data |
A matrix or a data.frame of objects which acts as the data cloud. Each row consists of a p-variate observation. |
Numerical vector of depths, one for each row in x; or one depth value if x is numerical.
Somedip Karmakar <[email protected]>
Omker Mahalanobish <[email protected]>
u<-matrix(rnorm(90,0,1),ncol=3) u0<-matrix(runif(9,0,1),ncol=3) spatial.depth(u0,u)u<-matrix(rnorm(90,0,1),ncol=3) u0<-matrix(runif(9,0,1),ncol=3) spatial.depth(u0,u)
spatial.outlier is used to find the multivariate spatial outlier within a p-variate data cloud or to identify if any p-variate observation is an outlier with respect to a p-variate data cloud.
spatial.outlier(data, x = data, threshold = 0.05)spatial.outlier(data, x = data, threshold = 0.05)
data |
A matrix or a data.frame of p-variate observations which works as the data cloud. |
x |
A matrix or a data.framep-variate to test whether is an outlier with respect to the |
threshold |
A decimal threshold between |
FALSE :: If there doesnot exist any outlier
A list with objects (If outliers exist)
index :: Returns the indices of the outliers
observation :: Returns the p-variate outliers
Somedip Karmakar <[email protected]>
Omker Mahalanobish <[email protected]>
u<-matrix(rnorm(60,0,1),ncol=3) u0<-matrix(runif(9,3,4),ncol=3) spatial.outlier(u,rbind(u,u0))u<-matrix(rnorm(60,0,1),ncol=3) u0<-matrix(runif(9,3,4),ncol=3) spatial.outlier(u,rbind(u,u0))
Used to compute the Spatial Rank of a p-variate observation with respect to a p-variate data cloud.
spatial.rank(x, data)spatial.rank(x, data)
x |
A numeric p-variate vector whose spatial rank is to be calculated. |
data |
A matrix or a data.frame with each row as a p-variate observation. |
The spatial rank of x with respect to data.
Somedip Karmakar <[email protected]>
Omker Mahalanobish <[email protected]>
u<-matrix(rnorm(90,0,1),ncol=3) u0<-runif(3,0,1) spatial.rank(u0,u)u<-matrix(rnorm(90,0,1),ncol=3) u0<-runif(3,0,1) spatial.rank(u0,u)