gendat_mvn_ram: Generate Multivariate Normal Data from RAM Matrices

Description Usage Arguments Details Value Author(s) Examples

View source: R/gendat.R

Description

Generates multivariate normal data from the RAM matices, and p dimensional vector of means.

Usage

1
gendat_mvn_ram(n, A, S, F, I, mu = NULL, ...)

Arguments

n

Sample size.

A

Asymmetric paths, such as regression coefficients and factor loadings.

S

Symmetric matrix representing variances and covariances.

F

Filter matrix used to select the observed variables.

I

Identity matrix.

mu

p dimensional mean vector. Defaults to zeros if unspecified.

...

Arguments to pass to FUN.

Details

The function interally uses the ram function to derive the Σ_{p \times p} matrix from the matices provided. The generated Σ_{p \times p} matrix is then used together with the p dimensional vector of means to generate data using gendat_mvn.

Value

Returns an n \times p multivariate normal data matrix generated using the variance-covariance matrix derived from the RAM matrices and the mean vector provided.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
A <- matrix(
  data = c(
    0, 0.26^(1 / 2), 0,
    0, 0, 0.26^(1 / 2),
    0, 0, 0
  ),
  ncol = 3
)
S <- F <- I <- diag(3)
S[1, 1] <- 225
S[2, 2] <- 166.5
S[3, 3] <- 166.5
mu <- c(100, 100, 100)
data <- gendat_mvn_ram(
  n = 100,
  A = A,
  S = S,
  F = F,
  I = I,
  mu = mu
)

jeksterslabds/jeksterslabRds documentation built on July 16, 2020, 3:41 p.m.