View source: R/multiple.pi.sim.R
multiple.pi.sim | R Documentation |
Simulation to illustrate the effect that confidence level and sample size have on the results of prediction interval width and correctness. Simulated samples are used to compute the prediction intervals and then one additional observation is generated and plotted for each inerval. If the additional observation does not fall in the prodiction interval, the interval is marked in red.
multiple.pi.sim( sample.sizes = c(30, 120), confidence.levels = c(0.8, 0.95), mu = 100, sigma = 10, number.simulations = 100, scale = 2 )
sample.sizes |
A vector of sample sizes. Length 2 is recommended. Default is sample.sizes=c(30, 120) |
confidence.levels |
A vector of confidence levels. Length 2 is recommended. Default is confidence.levels=c(0.8, 0.95) |
mu |
Mean of the distribution from which samples are taken (default is 100) |
sigma |
Standard deviation of the distribution from which samples are taken (default is 10). |
number.simulations |
Number of prediction intervals to be simulated (default is 100). |
scale |
Scale factor that determines the scale of the common y-axis of the plots. The default is 2. A larger number would allow more white space around edges. A smaller number might allow some of the interval endpoints to be outside of the plots. |
multiple.pi.sim() multiple.pi.sim(sample.sizes = c(10, 40)) multiple.pi.sim(confidence.levels = c(0.95, 0.99)) multiple.pi.sim(sample.sizes = c(10, 40), confidence.levels = c(0.95, 0.99))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.