myx: Simulate normal distributions for the purpose of illustrating...

View source: R/myx.R

myxR Documentation

Simulate normal distributions for the purpose of illustrating desirable properties of estimators

Description

Simulate normal distributions for the purpose of illustrating desirable properties of estimators

Usage

myx(
  N = 5,
  mean = 100,
  std = 15,
  seed = 12345,
  biased = FALSE,
  re = TRUE,
  ic = FALSE
)

Arguments

N

Number of samples

mean

Mean of population

std

Standard deviation of population

seed

Random number seed

biased

Generate a biased sampling distribution? True or False

re

Generate a relatively efficient sampling distribution? True or False

ic

Generate an inconsistent sampling distribution? True or False

Examples

g <- myx(N = 10, biased = TRUE)
suppressWarnings(print(g$g.pop))
g$g.sampdist
myx(biased = FALSE, re = TRUE)$g.sampdist +
ggplot2::ggtitle("Relatively Efficient (N = 10)")
myx(biased = FALSE, re = FALSE)$g.sampdist +
ggplot2::ggtitle("Relatively Inefficient (N = 10)")
g <- myx(N = 100, biased = FALSE)
g$g.pop
myx(N = 5, biased = TRUE)$g.sampdist +
ggplot2::ggtitle("Cindy: Narrower, but biased so not consistent", "Small N")
myx(N = 100, biased = TRUE)$g.sampdist +
ggplot2::ggtitle("Cindy: Narrower, but biased so not consistent", "Large N")

prox9974/soc429Code documentation built on June 16, 2022, 3:41 a.m.