Learn R Programming

shotGroups (version 0.7.1)

range2sigma: Estimate Rayleigh sigma based on range statistics

Description

Estimate the Rayleigh sigma parameter based on range statistics like extreme spread, figure of merit, or the bounding box diagonal. This function assumes a circular bivariate normal shot distribution with 0 mean.

Usage

range2sigma(x, stat="ES", n=5, nGroups=1, CIlevel=0.95, collapse=TRUE, dstTarget=100, conversion="m2cm")

Arguments

x
a numerical vector with values for extreme spread (ES), figure of merit (FoM), or the diagonal of the bounding box (D).
stat
a character vector with elements "ES" (extreme spread), "FoM" (figure of merit), or "D" (bounding box diagonal) indicating which range statistic is given in x. Elements correspond to those in x in the sense that the second element of stat indicates the statistic for the second element of x. If all elements of x are the same kind of statistic, stat only needs to indicate it once.
n
integer between 2 and 100. Number of shots in each group.
nGroups
integer between 1 and 10. Number of groups when x is the average of individually-measured range statistics from several groups.
CIlevel
confidence level (coverage probability) for the Rayleigh sigma confidence interval. If one of 0.5, 0.9, 0.95, 0.99, the CI is based on the corresponding quantiles of the Monte Carlo distribution of the range statistic for given n and nGroups. If not, CI can only be calculated for extreme spread using a Patnaik chi^2 approximation to the conditional distribution as suggested by Taylor and Grubbs (1975).
collapse
logical: should the list with CIs be simplified if possible?
dstTarget
a numerical value giving the distance to the target - used in MOA calculation. See getMOA.
conversion
how to convert the measurement unit for distance to target to that of the (x,y)-coordinates - used in MOA calculation. See getMOA.

Value

A list with the calculated values for sigma in one component, and the corresponding CIs in the other component.
sigma
The calculated values for sigma in the original measurement unit as well as in angular size measures.
sigmaCI
The calculated CIs for sigma in the original measurement unit as well as in angular size measures.

Details

Based on the lookup table DFdistr with results form a Monte Carlo simulation. If the value of n is not among those simulated (but is less than 100), a spline interpolation between the neighboring simulated values of the statistic's coefficient of variation is used.

If the Rayleigh sigma should be calculated for a value of n that was not simulated (but is less than 100), a spline interpolation between the neighboring simulated values is used.

Details for the calculation can be found under

http://ballistipedia.com/index.php?title=Range_Statistics

If package shiny is installed, an interactive web app for this functionality can be run with runGUI("range").

References

Taylor, M. S., & Grubbs, F. E. (1975). Approximate Probability Distributions for the Extreme Spread (BRL-MR-2438). Aberdeen Proving Ground, MD: U.S. Ballistic Research Laboratory.

See Also

DFdistr, efficiency, getRayParam, getMaxPairDist, getBoundingBox

Examples

Run this code
es  <- getMaxPairDist(DFscar17)$d
fom <- getBoundingBox(DFscar17)$FoM
d   <- getBoundingBox(DFscar17)$diag
range2sigma(c(es, fom, d), stat=c("ES", "FoM", "D"),
            n=nrow(DFscar17), nGroups=1, CIlevel=0.9)

# compare with Rayleigh sigma estimate from using
# (x,y)-coordinates of all shots
getRayParam(DFscar17, level=0.9)

Run the code above in your browser using DataLab