| 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 value determining whether an interactive panel is created or a static display is produced. |
panel.plot |
a logical parameter, relevant to the |
hscale, vscale |
scaling parameters, relevant to the |
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).
The tcltk panel object 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.