bounds: Calculate Normal Quantiles at Boundaries of Probability...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

qnorm expects scalar means and standard deviations, but a vector of probablities. In contrast, lower and upper are wrappers for qnorm that accept equal-length vectors for mean and standard deviation, but scalar probabilities. Probability can be supplied directly or calculated as the bound of a symmetric interval. bounds pairs lower and upper using suitable notation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
lower(x, sd, interval = 0.95, prob = 0.5 * (1 - interval), ...)
upper(x, sd, interval = 0.95, prob = 0.5 * (1 + interval), ...)
bounds(
	x, 
	sd, 
	interval = 0.95, 
	lower = 0.5 * (1 - interval), 
	upper = 0.5 * (1 + interval), 
	left = "(", 
	right = ")", 
	sep = ",", 
	digits = 3, 
	...
)

Arguments

x

means

sd

standard deviations, of same length as x

prob

probability, defaulting to the bounds of a symmetric interval

interval

width of a probability interval: e.g. confidence interval

lower

probability for the lower bound

upper

probability for the upper bound

left

character(s) to delimit the lower bound

right

character(s) to delimit the upper bound

sep

characters to delimit lower and upper quantiles

digits

number of significant digits: passed to signif

...

other arguments, passed to qnorm

Details

interval is a convenient way to set upper and lower probabilities, and is ignored if these are specified directly. left and right are passed to paste, and so will be repeated as necessary to match the length of x.

Value

lower and upper return numeric. bounds returns character.

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1
bounds(c(0,0,0),sd=c(.5,1,2))	

metrumrg documentation built on May 2, 2019, 5:55 p.m.