Learn R Programming

rgr (version 1.1.0)

gx.md.plt0: Function to Display Chi-square plots of Mahalanobis Distances

Description

This function is not called directly by the user but from functions that plot Mahalanobis distances, i.e. gx.md.gait and gx.md.plot.

Usage

gx.md.plt0(md, n, p, trim = trim, ptrim = -1, proc = proc,
	main = main, ifadd = ifadd, cexf = cexf, cex = cex, ...)

Arguments

md
a vector of Mahalanobis distances of length n.
n
the length of the vector of Mahalanobis distances.
p
the number of variables upon which the Mahalanobis distances are based.
trim
the number of individuals (observations or samples) that have been trimmed, and did not contribute to the estimation of covariance and means.
ptrim
the percentage trim requested, if a percentage (MVT) trim was requested.
proc
the procedure by which the Mahalanobis distances were estimated, used to ensure appropriate labelling of the Chi-square plot x-axis.
main
the title for the Chi-square plot.
ifadd
the probability based fences to be displayed on the Chi-square plots, set by the calling function and the user.
cexf
the text scale expansion factor for the annotation of the probability based fences, set by the calling function and the user.
cex
the text scale expansion factor for the other annotation within the frame of the Chi-square plot, set by the calling function and the user.
...
further arguments to be passed to methods concerning the generated plots. For example, if some colour other than black is required for the plotting characters, specify col = 2 to obtain red (see disp

See Also

gx.md.gait, gx.md.plot, gx.add.chisq

Examples

Run this code
## Make test data available
data(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Ensure all data are in the same units (mg/kg)
sind.mat2open <- sind.mat
sind.mat2open[, 2] <- sind.mat2open[, 2] * 10000

## Generate and display sets of Mahalanobis distances
gx.md.gait(ilr(sind.mat2open))
gx.md.gait(ilr(sind.mat2open), mcdstart = TRUE, ifadd = NULL)
gx.md.gait(ilr(sind.mat2open), mcdstart = TRUE, mvtstart = TRUE, trim = 3,
ifadd = 0.9)

## Clean-up and detach test data
rm(sind.mat)
rm(sind.mat2open)

Run the code above in your browser using DataLab