knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(jeksterslabRdata)
See mvnram()
for more details.
mu
Set matrices.
mu <- c(100, 100, 100) A <- matrix( data = c(0, sqrt(0.26), 0, 0, 0, sqrt(0.26), 0, 0, 0), ncol = 3 ) S <- diag(c(225, 166.5, 116.5)) F <- I <- diag(3)
Run the function.
X <- mvnram(n = 100, mu = mu, A = A, S = S, F = F, I = I)
Explore the output.
str(X) pairs(X) colMeans(X) cov(X) cor(X)
Run the function.
Xstar <- mvnram(n = 100, mu = mu, A = A, S = S, F = F, I = I, R = 100)
Explore the output.
str(Xstar, list.len = 6)
M
Set matrices.
M <- c(100, 50, 50) A <- matrix( data = c(0, sqrt(0.26), 0, 0, 0, sqrt(0.26), 0, 0, 0), ncol = 3 ) S <- diag(c(225, 166.5, 116.5)) F <- I <- diag(3)
Run the function.
X <- mvnram(n = 100, M = M, A = A, S = S, F = F, I = I)
Explore the output.
str(X) pairs(X) colMeans(X) cov(X) cor(X)
Run the function.
Xstar <- mvnram(n = 100, M = M, A = A, S = S, F = F, I = I, R = 100)
Explore the output.
str(Xstar, list.len = 6)
mu = NULL
and M = NULL
Set matrices.
A <- matrix( data = c(0, sqrt(0.26), 0, 0, 0, sqrt(0.26), 0, 0, 0), ncol = 3 ) S <- diag(c(225, 166.5, 116.5)) F <- I <- diag(3)
Run the function.
X <- mvnram(n = 100, A = A, S = S, F = F, I = I)
Explore the output.
str(X) pairs(X) colMeans(X) cov(X) cor(X)
Run the function.
Xstar <- mvnram(n = 100, A = A, S = S, F = F, I = I, R = 100)
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.