Learn R Programming

SciencesPo (version 0.05.21)

get.ci: Simulates Confidence Intervals

Description

Simulates the effect of sample size and the sampling design.

Usage

get.ci(sample=NULL,n=NULL,mu=0,sigma=1,level=0.95,type="mean")

Arguments

sample
an integer value to simulate the sampling design.
n
an integer for the sample size.
mu
the proportion mean of the population distribution: [0:1].
sigma
the size of variance
level
a value for the confidence level required, usually 0.95 to 0.99.
type
a character string for the type of simulation c(mean, var, pi)

Value

  • A plot with the simulated values for CI.

encoding

UTF-8

Examples

Run this code
get.ci(sample = 1000, n = 1, mu = .29)

get.ci(1000, 1, .29, 2, .90)

Run the code above in your browser using DataLab