cov_gen: Generation of covariance matrices

View source: R/cov_gen.R

cov_genR Documentation

Generation of covariance matrices

Description

Construct covariance matrices for the generation of simulated test data.

Usage

cov_gen(pr_grp_1, n_fac, n_ind, Lambda = 0:1)

Arguments

pr_grp_1

proportion of observations in group 1. Can be a scalar or a vector

n_fac

number of factors

n_ind

number of indicators per factor

Lambda

either a matrix containing the factor loadings or a vector containing the lower and upper limits for a randomly-generated Lambda matrix

Value

A list containing three covariance matrices: vcov_yxw, vcov_yxz and vcov_yfz

Examples

 vcov <- cov_gen(pr_grp_1 = .5, n_fac = 3, n_ind = 2)
 str(vcov)

tmatta/lsasim documentation built on Aug. 25, 2023, 5:50 p.m.