Function to Display Chi-square Plots of Mahalanobis Distances
Function to display Chi-square plots of Mahalanobis distances from objects saved from gx.mva
, gx.mva.closed
, gx.robmva
, gx.robmva.closed
, gx.md.gait
and gx.md.gait.closed
. The actual plotting of the displays is undertaken by function gx.md.plt0
. The function facilitates making ‘cosmetic’ changes to the Chi-square plots not so easily achieved in function gx.md.gait
and gx.md.gait.closed
, and not possible in functions gx.mva
, gx.mva.closed
, gx.robmva
or gx.robmva.closed
.
gx.md.plot(save, main = "", ifadd = c(0.98, 0.95, 0.9), cexf = 0.6, cex = 0.8, ...)
save |
a saved object from the execution of function |
main |
an alternate Chi-square plot title to that in the saved object, see Details below. |
ifadd |
if probability based fences are to be displayed on the Chi-square plots enter the probabilities here, see Details below. For no fences set |
cexf |
the text scale expansion factor for the annotation of the probability based fences, by default |
cex |
the text scale expansion factor for the other annotation within the ‘frame’ of the Chi-square plot, by default |
... |
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 |
If main
is undefined the name of the matrix object from which the Mahalanobis distances were derived is passed to the function via the saved object. Using the matrix name is the recommended procedure as it helps to track the progression during a GAIT exercise, and acts as a record of the data source. However, at a presentation stage an alternate plot title may preferred and can be defined in this function, e.g., main = "Plot Title Text"
. If no plot title is required set main = " "
.
By default three fences are placed on the Chi-square plots at probabilities of membership of the current ‘core’ data subset, or total data if appropriate, with ifadd = c(0.98, 0.95, 0.9)
. Alternate probabilities may be defined as best for the display. If no fences are required set ifadd = NULL
.
The Mahalanobis distance, Chi-square, plot x-axis label is set appropriately to indicated the type of robust start or trim using the value of proc
from the saved object passed to the function.
Robert G. Garrett
## Make test data available data(sind.mat2open) ## Save and display Chi-square plot sind.save <- gx.mva(ilr(sind.mat2open)) gx.md.plot(sind.save) gx.md.plot(sind.save, main = "Howarth & Sinding Larsen Stream Sediments\nilr transform", cexf = 0.8, cex = 1, col = 2) ## Save and display Chi-square plot with a ## mcd robust start and ilr transformation sind.save <- gx.md.gait(ilr(sind.mat2open), mcdstart = TRUE, mvtstart = TRUE, trim = 3, ifadd = NULL) gx.md.plot(sind.save) gx.md.plot(sind.save, main = paste("Howarth & Sinding-Larsen\nStream Sediments, ilr Transformed Data", "\nMCD robust start"), ifadd = 0.9, cex.main = 0.8) ## Clean-up rm(sind.save)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.