rValeMaurelli: 'rValeMaurelli' Simulate data from a multivariate nonnormal...

Description Usage Arguments Value Examples

View source: R/ValeMorelli.r

Description

rValeMaurelli Simulate data from a multivariate nonnormal distribution such that 1) Each marginal distribution has a specified skewness and kurtosis 2) The marginal variables have the correlation matrix R

Usage

1
rValeMaurelli(n, R, Fcoef)

Arguments

n

number of random vectors to be generated

R

desired correlation matrix of transformed variables

Fcoef

either vector with coefficents for the Fleishman transform to be applied to all variables or (nrow(R),3) matrix with different coefficients

Value

X (n,nrow(R)) data matrix

Examples

1
2
3
4
R <- matrix(c(1, 0.5, 0.3, 0.5 ,1, 0.2 , 0.3, 0.2 , 1),3,3)
coef <-  matrix(c( 0.90475830, 0.14721082, 0.02386092,0.78999781,0.57487681,
                            -0.05473674,0.79338100, 0.05859729, 0.06363759 ),3,3,byrow=TRUE) 
V <- rValeMaurelli(50, R, coef) 

cbsem documentation built on May 2, 2019, 5:56 a.m.

Related to rValeMaurelli in cbsem...