Learn R Programming

shotGroups (version 0.6.2)

analyzeGroup: Analysis for a single group of bullet holes

Description

Performs a comprehensive numerical and graphical analysis of a single group of bullet holes.

Usage

analyzeGroup(DF, xyTopLeft = TRUE, conversion = 'm2cm', bandW = 0.5,
             CEPtype = 'CorrNormal', bootCI = c('basic', 'bca'))

Arguments

DF
a data frame containing (at least) either the variables Point.X, Point.Y or X, Y defining the bullet holes. Variables Distance (distance to target), Aim.X, Aim.Y (p
xyTopLeft
logical: is the origin of the absolute coordinate system in the top-left corner? See details.
conversion
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates in MOA calculation. See getMOA.
bandW
for argument bandwith of smoothScatter.
CEPtype
string vector indicating which CEP estimate to report in getCEP.
bootCI
a character vector to select which bootstrap confidence interval type to report. Possible types are 'none' (no bootstrap CI), 'norm', 'basic', 'perc', 'bca'. See

Value

  • A list with the results from the numerical analyses and statistical tests.
  • corXYcorrelation matrix of (x,y)-coordinates.
  • corXYrobrobust estimate of correlation matrix of (x,y)-coordinates.
  • Outliersa vector of row indices for observations identified as outliers.
  • ShapiroXShapiro-Wilk-Test result for normality of x-coordinates.
  • ShapiroYShapiro-Wilk-Test result for normality of y-coordinates.
  • multNormE-statistic-Test result for multivariate normality of (x,y)-coordinates.
  • sdXYstandard deviations of x- and y-coordinates (in original measurement units, MOA, SMOA, milliradian).
  • sdXciparametric and bootstrap confidence intervals for the standard deviation of x-coordinates (in original measurement units, MOA, SMOA, milliradian).
  • sdYciparametric and bootstrap confidence intervals for the standard deviation of y-coordinates (in original measurement units, MOA, SMOA, milliradian).
  • sdXYrobrobust standard deviations of x- and y-coordinates (in original measurement units, MOA, SMOA, milliradian).
  • covXYcovariance matrix of (x,y)-coordinates.
  • covXYrobrobust estimate of covariance matrix of (x,y)-coordinates.
  • distToCtrmean and median distance from points to their center as well as estimated Rayleigh parameters sigma (precision), radial standard deviation RSD, and mean radius MR (in original measurement units, MOA, SMOA, milliradian).
  • sigmaCI95%-parametric and bootstrap confidence intervals for sigma (in original measurement units, MOA, SMOA, milliradian).
  • RSDci95%-parametric and bootstrap confidence intervals for radial standard deviation RSD (in original measurement units, MOA, SMOA, milliradian).
  • MRci95%-parametric and bootstrap confidence intervals for mean radius MR (in original measurement units, MOA, SMOA, milliradian).
  • maxPairDistmaximum pairwise distance between points (center-to-center, = maximum spread, in original measurement units, MOA, SMOA, milliradian).
  • groupRectwidth and height of bounding box with diagonal and figure of merit FoM (average side length, in original measurement units, MOA, SMOA, milliradian).
  • groupRectMinwidth and height of minimum-area bounding box with diagonal and figure of merit FoM (average side length, in original measurement units, MOA, SMOA, milliradian).
  • minCircleRadradius for the minimum enclosing circle (in original measurement units, MOA, SMOA, milliradian).
  • confElllength of semi-major and semi-minor axis of the 50%-confidence ellipse (in original measurement units, MOA, SMOA, milliradian).
  • confEllRoblength of semi-major and semi-minor axis of the 50%-confidence ellipse based on a robust estimate for the covariance matrix (in original measurement units, MOA, SMOA, milliradian).
  • confEllShapeaspect ratio and flattening of the 50%-confidence ellipse.
  • confEllShapeRobaspect ratio and flattening of the 50%-confidence ellipse based on a robust estimate for the covariance matrix.
  • CEPestimate(s) for the 50%-circular error probable (CEP, in original measurement units, MOA, SMOA, milliradian).
  • ctr(x,y)-offset of group center relative to point of aim.
  • ctrXci95%-parametric and bootstrap confidence intervals for center x-coordinate.
  • ctrYci95%-parametric and bootstrap confidence intervals for center y-coordinate.
  • ctrRobrobust estimate of group center offset relative to point of aim (MCD algorithm).
  • distPOAdistance from group center to point of aim (in original measurement units, MOA, SMOA, milliradian).
  • distPOArobdistance from robust estimate of group center to point of aim (in original measurement units, MOA, SMOA, milliradian).
  • HotellingHotelling's T^2-Test result from testing if group center equals point of aim.

Details

By default, OnTarget PC/TDS' 'Export Point Data' places the origin of the absolute coordinate system in the top-left corner. In OnTarget TDS, this setting can be changed by checking the box 'Tools -> Options -> Options tab -> Data Export -> Invert Y-Axis on Export'. In that case, use xyTopLeft=FALSE. If groups appear to be upside-down, xyTopLeft is the setting to change. Robust estimates for the group center and the covariance matrix of (x,y)-coordinates are from covMcd using the MCD algorithm. This function is a wrapper for groupShape, groupLocation, and groupSpread. If the data is missing information about the point of aim, (0,0) is assumed. If distance to target is missing, 100 is assumed. The number of replicates for the reported bootstrap confidence intervals is at least 1499. If the BCa interval is reported, it is at least the number of points. In addition to the numerical results listed below, this function produces the following diagrams:
  • a combined plot for multivariate outlier identification as produced byaq.plot
  • a scatterplot of the (x,y)-coordinates together with group center, circle with average distance to center, 50\%-confidence ellipse - the latter also based on a robust estimate for the covariance matrix
  • a scatterplot of the (x,y)-coordinates together with the minimum bounding box, minimum enclosing circle, and maximum group spread
  • a chi-square Q-Q-plot for eyeballing multivariate normality as produced bychisq.plot, including a reference line with intercept 0 and slope 1
  • a heatmap of a 2D-kernel density estimate for the (x,y)-coordinates as produced bysmoothScattertogether with group center and error ellipse based on a robust estimate for the covariance matrix
  • a Q-Q-plot of x-coordinates for eyeballing normality
  • a Q-Q-plot of y-coordinates for eyeballing normality
  • a histogram of x-coordinates including a fitted normal distribution as well as a non-parametric kernel density estimate
  • a histogram of y-coordinates including a fitted normal distribution as well as a non-parametric kernel density estimate
  • a histogram of distances to group center including a fitted Rayleigh distribution as well as a non-parametric kernel density estimate

See Also

groupShape, groupLocation, groupSpread, compareGroups, getDistToCtr, getMaxPairDist, getBoundingBox, getMinBBox, getMinCircle, getConfEll, getCEP, getRayParam, getMOA, smoothScatter, chisq.plot, aq.plot, pcout, qqnorm, hist, kernel, shapiro.test, mvnorm.etest, anova.mlm, boot, boot.ci, covMcd

Examples

Run this code
data(DFinch)

# select combined data from only first 2 series
DF  <- subset(DFinch, series %in% 1:2)
res <- analyzeGroup(DF, conversion='yd2in', bootCI='none')
names(res)
res$multNorm
res$corXY
res$ctrRob
res$ctrXci
res$ctrYci

Run the code above in your browser using DataLab