knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(jeksterslabRdata)
See mvn()
for more details.
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)
Run the function.
Xstar <- mvn(n = 100, mu = mu, Sigma = Sigma, R = 1000)
Explore the output.
str(Xstar, list.len = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.