interval.plot {PASWR} | R Documentation |
Interval Plot
Description
Function to graph confidence intervals
Usage
interval.plot(ll, ul)
Arguments
ll |
vector of lower confidence interval values |
ul |
vector of upper confidence interval values |
See Also
CIsim
Examples
set.seed(402)
m <- 100 # Number of samples
n <- 500 # Sample size
a <- array(0,m)
ll <- array(0,m)
ul <- array(0,m)
i <- 0
while (i < m)
{ i <- i + 1
a[i] <- mean(rnorm(n))
ll[i] <- a[i] + qnorm(0.025)*sqrt(1/n)
ul[i] <- a[i] + qnorm(0.975)*sqrt(1/n)
}
interval.plot(ll,ul)
[Package
PASWR version 1.0
Index]