Learn R Programming

shotGroups (version 0.3)

getRayParam: Estimate Rayleigh parameters sigma, RSD, and MR

Description

Estimates the radial precision parameter sigma of the Rayleigh distribution together with the Rayleigh radial standard deviation RSD and the Rayleigh mean MR, including parametric confidence intervals.

Usage

getRayParam(xy, type = c('Rayleigh', 'Gauss'), level = 0.95, accuracy = FALSE)

## S3 method for class 'data.frame':
getRayParam(xy, type = c('Rayleigh', 'Gauss'), level = 0.95, accuracy = FALSE)

## S3 method for class 'default':
getRayParam(xy, type = c('Rayleigh', 'Gauss'), level = 0.95, accuracy = FALSE)

Arguments

xy
either a numerical (n x 2)-matrix with the (x,y)-coordinates of n points (1 row of coordinates per point), or a data frame with either the variables X, Y or Point.X, Point.Y.
type
string vector indicating which sigma estimate to report (see details).
level
a numerical value with the coverage for the confidence intervals for sigma, RSD, MR.
accuracy
a logical value indicating whether systematic location bias should be taken into account with the Rayleigh sigma estimate (see details).

Value

  • A list with the estimates for sigma, RSD, and MR including the confidence intervals.
  • sigmaA vector with the sigma estimate and confidence interval bounds as named elements sigma, sigCIlo, sigCIup.
  • RSDA vector with the RSD estimate and confidence interval bounds as named elements RSD, RSDciLo, RSDciUp.
  • MRA vector with the MR estimate and confidence interval bounds as named elements MR, MRciLo, MRciUp.

Details

By default, the reported sigma estimate does not take into account accuracy, i.e., any systematic location bias. The Rayleigh estimate combined with accuracy=TRUE can incorporate systematic deviation from point of aim. RSD and MR each are a constant fraction of sigma.
  • The Rayleigh estimate uses the sum of squared radii as a variance estimate, and then employs a correction factor for taking the square root. Withaccuracy=FALSE, the data is centered first, otherwise the radius is the distance to (0,0), assumed to be the point of aim.
  • The Gauss estimate uses the average x- and y-variance as a variance estimate, and then employs a correction factor for taking the square root. The optionaccuracyis ignored, the behavior is always asaccuracy=FALSE.

References

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

See Also

getCEP, groupSpread

Examples

Run this code
# coordinates given by a suitable data frame
getRayParam(DFtalon, type='Gauss', level=0.95, accuracy=FALSE)

# coordinates given by a matrix
xy <- matrix(round(rnorm(100, 0, 5), 2), ncol=2)
getRayParam(xy, type='Gauss', level=0.95, accuracy=FALSE)

Run the code above in your browser using DataLab