knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(jeksterslabRdata)

Documentation

See univ() for more details.

Examples

Normal Distribution

Single Random Data Set

Run the function.

x <- univ(n = 100, rFUN = rnorm, mean = 100, sd = sqrt(225))

Explore the output.

str(x, list.len = 6)
hist(x, main = expression(italic(N)(list(mu == 100, sigma^2 == 225))))

Multiple Random Data Sets

Run the function.

xstar <- univ(n = 100, rFUN = rnorm, mean = 100, sd = sqrt(225), R = 100)

Explore the output.

str(xstar, list.len = 6)

Bernoulli Distribution

Single Random Data Set

Run the function.

x <- univ(n = 100, rFUN = rbinom, size = 1, prob = 0.50)

Explore the output.

str(x, list.len = 6)
barplot(table(x), main = expression(italic("Bernoulli")(p == 0.50)))

Multiple Random Data Sets

Run the function.

x <- univ(n = 100, rFUN = rbinom, size = 1, prob = 0.50, R = 100)

Explore the output.

str(xstar, list.len = 6)

Binomial Distribution

Single Random Data Set

Run the function.

x <- univ(n = 100, rFUN = rbinom, size = 20, prob = 0.50)

Explore the output.

str(x, list.len = 6)
barplot(table(x), main = expression(italic("Binomial")(list(n == 20, p == 0.50))))

Multiple Random Data Sets

Run the function.

x <- univ(n = 100, rFUN = rbinom, size = 20, prob = 0.50, R = 100)

Explore the output.

str(xstar, list.len = 6)

Exponential Distribution

Single Random Data Set

Run the function.

x <- univ(n = 100, rFUN = rexp, rate = 1)

Explore the output.

str(x, list.len = 6)
hist(x, main = expression(italic(exp)(lambda == 1)))

Multiple Random Data Sets

Run the function.

xstar <- univ(n = 100, rFUN = rexp, rate = 1, R = 100)

Explore the output.

str(xstar, list.len = 6)


jeksterslabds/jeksterslabRdata documentation built on July 24, 2020, 5:49 a.m.