muqie: Two-dimensional Quantile

View source: R/muqie.R

muqieR Documentation

Two-dimensional Quantile

Description

This function plots the collection of all MUltivariate QuantIlE points in two dimensions (muqie) over all unit-length direction vectors u, which projects the yamm-centred multivariate data onto the chosen vector u to obtain a univariate set. The muqie point is merely the vector u rescaled to have length equal to the quantile of the univariate set.

Usage

muqie(xdata, dm=c(1,2), probs=0.5, nsegs=20,
      nprojs=2000, reltol=0.001, plot.it=FALSE, 
      full.return=FALSE, xlab=NULL, ylab=NULL)

Arguments

xdata

The data as a matrix or dataframe with the number of columns greater than or equal to two, with each row being viewed as one multivariate observation.

dm

A numeric vector with two entries representing the selected columns of the data considered. The default value is c(1,2), which means the first two columns of data are chosen if the dimension of data is more than two.

probs

The quantile of the data after projected to obtain a univariate set.

nsegs

The number of the two-dimensional unit-length direction vectors u, which is computed by dividing a unit circle into nsegs equal sectors.

nprojs

The number of projections for the dataset when computing yamm. The default value is 2000.

reltol

The tolerance of the optimisation process in the function yamm. The default value is 0.001.

plot.it

Logical. If TRUE, the function muqie will produce a two-dimensional quantile plot.

full.return

Logical. If TRUE, the function muqie will return a list of full results. See “Value”.

xlab

x-axis label for the quantile plot.

ylab

y-axis label for the quantile plot.

Value

If full.results = TRUE, it returns a list comprising of

ans

A data matrix with four rows. The first row represents the angle of the unit-length projection vector u to the positive x-axis, while the second and third row are the x- and y-coordinates of the projection vector respectively. The last row is univariate quantile of the projected data matrix.

uvd

A data matrix after projecting the yamm-centred multivariate data onto a set of projection vectors u.

cdata

The yamm-centred multivariate data matrix.

yamm

The yamm value of the multivariate data. See yamm for more details.

If full.results = FALSE (default), it will only return ans.

References

Chen, F. and Nason, Guy P. (2020) A new method for computing the projection medi an, its influence curve and techniques for the production of projected quantile plots. PLOS One, doi: 10.1371/journal.pone.0229845

See Also

yamm

Examples

data(beetle)
#
# Compute the 0.7-quantile for the first two columns of the beetle data. 
muqie(beetle,dm=c(1,4), probs=0.7)

Yamm documentation built on May 20, 2022, 5:06 p.m.