Learn R Programming

MonteCarloSEM (version 2.0.0)

fcors.value: Specifies the Factor Correlation Matrix for a Model

Description

This function generates a symmetric factor correlation matrix for a Structural Equation Model. The correlations must be provided as a vector of values between -1 and +1. The vector can be entered in either row-wise or column-wise order, but the correlations must be supplied in the correct sequence. If the model includes only a single factor, the function should be called as: "fcors.value(nf = 1, cors = c(1))"

Usage

fcors.value(nf, cors)

Value

The function returns the factor correlation matrix.

Arguments

nf

An integer specifying the number of factors.

cors

A numeric vector of correlations among the factors. Values must be between -1 and +1.

Author

Fatih Orcan

Examples

Run this code
# This example represents a three-factor CFA model
#
fcors.value(nf=3, cors=c(1,.5,.6,.5,1,.4,.6,.4,1))

Run the code above in your browser using DataLab