gendatafa_A {lazy.procrustes}R Documentation

Generate Simple Structure Factor Pattern

Description

Generate Simple Structure Factor Pattern

Usage

gendatafa_A(n, ndim, large = 0.8, small = 0.2, sd = 0.07, pc = 0, reorder = 0)

Arguments

n

# of variables

ndim

# of dimensions

large

The mean of large factor loadings

small

The mean of small factor loadings

sd

The standard deviation of factor loadings

pc

= 1 to rotate the result so that A'A=diag.
= 0 to do nothing.

reorder

= 1 to reorder the rows by reorder_fa.
= 2 to reorder the rows and columns by reorder_fa.

Details

First, an Independent Cluster factor loadings matrix, A0, which is a n x ndim block diagonal rectangular matrix consisting of 1s and 0s, will be generated.
Then, the 1s will be replaced by the random variables from N(large,sd^2), and 0s, by the ones from N(small,sd^2).
If pc=1, the above loadings matrix A will be rotated so that t(A)%*%A=I.
If reorder=1 or 2, the above A matrix will be reordered.

Therefore, if
resg=gendatafa_A(n,ndim, pc=1, reorder=2)
(resg$loadings01%*%resg$rotmat)[resg$row_order,resg$col_order]
make resg$loadings and A0 comparable.

large=1, small=0, sd=0, pc=0, reorder=0 will create a 0-1 block diagonal matrix.

Value

A list of
loadings = A matrix
loadings01 = A0 matrix
rotmat = The rotation matrix to pc
row_order = The row reorder index
col_order = The col reorder index

Examples

A01=gendatafa_A( 20, 4, large=1,small=0, pc=0, sd=0, reorder=0 )
A=gendatafa_A( 20, 4 )


[Package lazy.procrustes version 0.1.4 Index]