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

Documentation

See mvn() for more details.

Examples

Single Random Data Set

Set mu and Sigma.

mu <- c(100, 100, 100)
Sigma <- matrix(
  data = c(225, 112.50, 56.25, 112.5, 225, 112.5, 56.25, 112.50, 225),
  ncol = 3
)

Run the function.

X <- mvn(n = 100, mu = mu, Sigma = Sigma)

Explore the output.

str(X)
psych::pairs.panels(X)
colMeans(X)
cov(X)
cor(X)

Multiple Random Data Sets

Run the function.

Xstar <- mvn(n = 100, mu = mu, Sigma = Sigma, R = 1000)

Explore the output.

str(Xstar, list.len = 6)


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