Learn R Programming

CGPfunctions (version 0.6.3)

OurConf: Plotting random samples of confidence intervals around the mean

Description

This function takes some parameters and simulates random samples and their confidence intervals

Usage

OurConf(samples = 100, n = 30, mu = 0, sigma = 1, conf.level = 0.95)

Arguments

samples

The number of times to draw random samples

n

The sample size we draw each time

mu

The population mean mu

sigma

The population standard deviation

conf.level

What confidence level to compute 1 - alpha (significance level)

Value

A ggplot2 object

See Also

stats::qnorm, stats::rnorm, BSDA::CIsim

Examples

Run this code
# NOT RUN {
OurConf(samples = 100, n = 30, mu = 0, sigma = 1, conf.level = 0.95)
OurConf(samples = 2, n = 5)
OurConf(samples = 25, n = 25, mu = 100, sigma = 20, conf.level = 0.99)
# }

Run the code above in your browser using DataLab