lowertri_constraint_matrix: Lower Triangular Factor Constraints

Description Usage Arguments Value See Also Examples

Description

Create lower-triangular constraints as used for the loadings matrix in confirmatory factor analysis.

Usage

1
lowertri_constraint_matrix(n, factors = 1, ones = TRUE)

Arguments

n

Number of variables

factors

Number of factors

ones

If TRUE, then the diagonal is equal to 1, if FALSE the diagonal is set to Inf (positive).

Value

Matrix with n rows and factors columns, with 1's or Inf on the diagonal, NA below the diagonal, and 0's above the diagonal.

See Also

flatten_constraints

Examples

1
2
3
constraints <- lowertri_constraint_matrix(3, 2)
constraints
flatten_constraints(constraints)

jrnold/flatter documentation built on May 20, 2019, 1:01 a.m.