Description Usage Arguments Details Value Note Author(s) References See Also Examples
Compute the sample size necessary to achieve a specified confidence level for a nonparametric confidence interval for a quantile.
1 2 3 
p 
numeric vector of probabilities specifying the quantiles.
All values of 
lcl.rank, n.plus.one.minus.ucl.rank 
numeric vectors of nonnegative integers indicating the ranks of the
order statistics that are used for the lower and upper bounds of the
confidence interval for the specified quantile(s). When 
ci.type 
character string indicating what kind of confidence interval to compute. The
possible values are 
conf.level 
numeric vector of numbers between 0 and 1 indicating the confidence level
associated with the confidence interval(s). The default value is

If the arguments p
, lcl.rank
,
n.plus.one.minus.ucl.rank
and conf.level
are not all the
same length, they are replicated to be the
same length as the length of the longest argument.
The help file for eqnpar
explains how nonparametric confidence
intervals for quantiles are constructed and how the confidence level
associated with the confidence interval is computed based on specified values
for the sample size and the ranks of the order statistics used for
the bounds of the confidence interval.
The function ciNparN
determines the required the sample size via
a nonlinear optimization.
numeric vector of sample sizes.
See the help file for eqnpar
.
Steven P. Millard (EnvStats@ProbStatInfo.com)
See the help file for eqnpar
.
eqnpar
, ciNparConfLevel
,
plotCiNparDesign
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  # Look at how the required sample size for a confidence interval
# increases with increasing confidence level for a fixed quantile:
seq(0.5, 0.9, by = 0.1)
#[1] 0.5 0.6 0.7 0.8 0.9
ciNparN(p = 0.9, conf.level=seq(0.5, 0.9, by = 0.1))
#[1] 7 9 12 16 22
#
# Look at how the required sample size for a confidence interval increases
# as the quantile moves away from 0.5:
ciNparN(p = seq(0.5, 0.9, by = 0.1))
#[1] 6 7 9 14 29

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.