Learn R Programming

shotGroups (version 0.2-2)

groupSpread: Spread measures of a single group of bullet holes

Description

Provides spread measures and their graphical representations for a single group of bullet holes.

Usage

groupSpread(xy, plots = TRUE, level = 0.5,
            dstTarget = 25, conversion = 'm2cm')

Arguments

xy
a numerical (n x 2)-matrix with the (x,y)-coordinates of n points (1 row of coordinates per point).
plots
a logical value indicating whether diagrams should be shown.
level
a numerical value giving the coverage for the confidence ellipse.
dstTarget
a numerical value giving the distance to the target in MOA calculation. See getMOA.
conversion
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates in MOA calculation. See getMOA.

Value

  • A list with the results from the numerical analyses and statistical tests.
  • sdXYstandard deviations of x- and y coordinates (in original measurement units and MOA).
  • CIsdXYparametric 95%-confidence interval for the standard deviations of x- and y coordinates (in original measurement units).
  • sdXYrobrobust standard deviations of x- and y-coordinates (in original measurement units and MOA).
  • covXYcovariance matrix of (x,y)-coordinates.
  • covXYrobrobust estimate of covariance matrix of (x,y)-coordinates.
  • meanDistToCtraverage distance from points to their center (in original measurement units and MOA).
  • maxPairDistmaximum pairwise distance between points (center-to-center, a.k.a. maximum spread, in original measurement units and MOA).
  • groupRectwidth and height of minimum bounding box (in original measurement units and MOA).
  • minCircleRadradius for the minimum enclosing circle (in original measurement units and MOA).
  • confElllength of semi-major and semi-minor axis of the confidence ellipse (in original measurement units and MOA).
  • confEllRoblength of semi-major and semi-minor axis of the confidence ellipse based on a robust estimate for the covariance matrix (in original measurement units and MOA).
  • confEllShapeaspect ratio and flattening of the confidence ellipse.
  • confEllShapeRobaspect ratio and flattening of the confidence ellipse based on a robust estimate for the covariance matrix.
  • CEPrandmodified RAND R-234 estimate for the circular error probable (CEP, in original measurement units and MOA).

Details

Robust estimate for the covariance matrix of (x,y)-coordinates is from covMcd using the MCD algorithm. In addition to the numerical results listed below, this function produces the following diagrams:
  • a scatterplot of the (x,y)-coordinates together with group center, circle with average distance to center, and 100*level\%-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 histogram for distances to group center including a nonparametric kernel density estimate

See Also

getDistToCtr, getMaxPairDist, getMinBBox, getMinCircle, getConfEll, getCEP, getMOA, hist, kernel, covMcd,

Examples

Run this code
xy  <- matrix(round(rnorm(200, 0, 5), 2), ncol=2)
res <- groupSpread(xy, level=0.5, dstTarget=25, conversion='m2cm')
names(res)
res$sdXYrob
res$meanDistToCtr
res$maxPairDist
res$CEPrand

Run the code above in your browser using DataLab