PolyCI: Generate a polygon representing the confidence bounds for a...

Description Usage Arguments Details

Description

PolyCI is a function that generates a data frame containing the coordinates defining a polygon representing the confidence bounds around a bed surface grain size distribution. The function contains an option to generate a plot of the distribution showing the estimates of the percentiles between the D5 and the D95, as well as the confidence limits about those estimates.

Usage

1
2
PolyCI(cfd, n, P = seq(1, 99, 1), equaltail = T, alpha = 0.05,
  plot = FALSE)

Arguments

cfd

is a data frame providing a list grain sizes in the first variable and the corresponding cumulative proportion finer in the second. The grain sizes should be recorded in mm, and the proportion finer in [0,1].

n

is the total number of observations upon which the cumulative frequency distribution in cfd is based

P

numeric vector of percentiles defining the polygon vertices, with values in [0,100].

equaltail

is a logical variable that determines whether the calculations of the confidence interval are based on an approximation with equal areas in each tail (the default), or based on the exact binomial solution with a coverage of at least 95%

alpha

the desired confidence level for which to calculate a confidence interval in [0,1].

plot

optional flag to produce a graph of the resulting grain size distribution

Details

The function returns a polygon object containing y coordinates that range from 0 to 1 (i.e. the proportion finer), and corresponding grain sizes that define the upper and lower bounds to the grain size confidence interval.


bceaton/GSDtools documentation built on June 7, 2019, 12:53 a.m.