gx.md.print: Function to Display Membership Probabilities

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/gx.md.print.R

Description

Function to display the Mahalanobis distances (MDs) and predicted probabilities of membership (ppm) following computations by functions gx.md.gait, gx.md.gait.closed, gx.mva, gx.mva.closed, gx.robmva or gx.robmva.closed. The user may select the predicted probability of membership below which the results are displayed. Alternately the Mahalanobis distances and group membership probabilities may be saved as a ‘.csv’ file for future use.

Usage

1
gx.md.print(save, pcut = 0.1, ifprint = TRUE, file = NULL)

Arguments

save

a saved object from any of functions gx.md.gait, gx.md.gait.closed, gx.mva, gx.mva.closed, gx.robmva, or gx.robmva.closed.

pcut

the probabilitity of group membership below which records will be displayed on the current device in ascending order of membership probability, i.e. the most outlying individuals first.

ifprint

by default, ifprint = TRUE, the most outlying individuals are displayed displayed on the current device, see pcut above. To suppress the display set pcut = FALSE.

file

the name of the folder where the file is to be saved, a ‘/’ is appended before the synthesized file name, details of which are displayed on the current device. If no folder is specified, the files are saved to the Working Directory, see Details below. The default, file = NULL, results in no file being saved.

Details

The Mahanalobis distances, the membership probabilities and input matrix row numbers or IDs are extracted from the saved object and sorted in increasing order of probabilities of group membership for display on the current device. The full table of Mahalanobis distances and group membership probabilities may be saved as a ‘.csv’ file. If a folder name has been provided in file, a ‘\’ is appended prior to a file name synthesized from the name of the saved object concatenated with ‘_MDs.csv’. If file = "" or file = " " the file will be saved to the Working Directory. Details of the file name are displayed on the current device, see Example below. For an alternative display see gx.md.display.

Value

table.rows

The last table processed is returned and may be saved as an object if required.

Note

This function is similar in purpose to gx.mvalloc.print for displaying multivariate outliers, however, it operates on a single population.

Author(s)

Robert G. Garrett

See Also

gx.md.gait, gx.md.gait.closed, gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed, gx.md.display, gx.mvalloc, gx.mvalloc.print.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Make test data available
data(sind.mat2open)

## Estimate and display robust Mahalanobis distances
sind.save <- gx.robmva.closed(sind.mat2open)
gx.md.print(sind.save, pcut = 0.3)

## Save display for future use, not executed
## gx.md.print(sind.save, ifprint = FALSE, file = "D://R_work//Project3")

## Clean-up
rm(sind.save)

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to gx.md.print in rgr...