rp.ci | R Documentation |
This function shows simulated confidence intervals for the mean of a normal distribution. It also creates a panel which controls the mean and standard deviation of the population and the size of the simulated sample.
rp.ci(mu = 0, sigma = 1, sample.sizes = c(30, 50, 100, 200, 500), confidence = 0.95, panel = TRUE, panel.plot = TRUE, hscale = NA, vscale = hscale)
mu, sigma |
the population mean and standard deviation. |
sample.sizes |
the available sample sizes ( |
confidence |
the available confidence levels ( |
panel |
a logical parameter which determines whether interactive controls are provided or a simple static plot is produced. |
panel.plot |
a logical parameter which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE). If the plot is to be placed inside the panel then the |
hscale, vscale |
scaling parameters for the size of the plot when |
A button is provided to sample repeatedly from the current settings. Confidence intervals which cover the population mean are coloured blue while those which miss are coloured red. Repeated simulations illustrate the property of confidence intervals to capture the true value with probability determined by the confidence level (which here is set to 0.95).
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
## Not run: rp.ci() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.