Learn R Programming

shotGroups (version 0.2-2)

groupLocation: Location measures for a single group of bullet holes

Description

Calculates location measures for a single group of bullet holes.

Usage

groupLocation(xy, plots = c('0', '1', '2'), dstTarget = 25,
              conversion = 'm2cm', target = c('BDS', 'DSB'),
              unit=c('cm', 'in'), caliber=0.9)

Arguments

xy
a numerical (n x 2)-matrix with the (x,y)-coordinates of n points (1 row of coordinates per point).
plots
a numerical value indicating whether a 2D-scatterplot should be shown. 0: no plot, 1: regular scatterplot, 2: scatterplot with added target in the background.
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.
target
a character string indicating the target type to be drawn in the scatterplot. Currently, only two types of pistol targets are supported.
unit
a character string indicating the measurement unit for the (x,y)-coordinates. Only used with plot=2.
caliber
a numerical value indicating the bullet diameter in the measurement unit specified by unit. Only used with plot=2.

Value

  • A list with the results from the numerical analyses and statistical tests.
  • ctr(x,y)-offset of group center relative to point of aim.
  • 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 and MOA).
  • distPOArobdistance from robust estimate of group center to point of aim (in original measurement units and MOA).
  • HotellingHotelling's T^2-Test result from testing if group center equals point of aim.
  • CItX95% t-confidence interval for x-coordinates.
  • CItY95% t-confidence interval for y-coordinates.
  • CIbootX95% bootstrap-confidence intervals for x-coordinates (percentile and BCa, 1499 replicates).
  • CIbootY95% bootstrap-confidence intervals for y-coordinates (percentile and BCa, 1499 replicates).

See Also

getMOA, covMcd, anova.mlm, boot, boot.ci

Examples

Run this code
# assume data from pistol shooting at 25m with 9mm ammo
# metric units
xy  <- matrix(round(rnorm(100, 0, 5), 2), ncol=2)
res <- groupLocation(xy, dstTarget=25, conversion='m2cm', plots=2,
                     target='BDS', unit='cm', caliber=0.9)
names(res)
res$ctr
res$distPOA
res$CIbootX
res$CIbootY

Run the code above in your browser using DataLab