Learn R Programming

lsasim (version 2.1.4)

cor_gen: Generation of random correlation matrix

Description

Creates a random correlation matrix.

Usage

cor_gen(n_var, cov_bounds = c(-1, 1))

Arguments

n_var

integer number of variables.

cov_bounds

a vector containing the bounds of the covariance matrix.

Details

The result from cor_gen can be used directly with the cor_matrix argument of questionnaire_gen.

Examples

Run this code
cor_gen(n_var = 10)

Run the code above in your browser using DataLab