# genPhi: Create a random Phi matrix with maximum factor correlation In fungible: Psychometric Functions from the Waller Lab

## Description

Create a random Phi matrix with maximum factor correlation.

## Usage

 `1` ```genPhi(NFac, EigenValPower = 6, MaxAbsPhi = 0.5) ```

## Arguments

 `NFac` Number of factors. `EigenValPower` (Scalar > 1) A scalar than controls the positive skewness of the distribution of eigenvalues of Phi. `MaxAbsPhi` (Scaler in [0,1]) The maximum off diagonal of Phi (the factor correlation matrix).

## Value

A factor correlation matrix. Note that the returned matrix is not guaranteed to be positive definite. However, a PD check is performed in simFA so that simFA always produces a PD Phi matrix.

Niels Waller

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```NFac <- 5 par(mfrow=c(2,2)) for(i in 1:4){ R <- genPhi(NFac, EigenValPower = 6, MaxAbsPhi = 0.5) L <- eigen(R)\$values plot(1:NFac, L, type="b", ylab = "Eigenvalues of Phi", xlab = "Dimensions", ylim=c(0,L+.5)) } ```

fungible documentation built on Sept. 29, 2021, 1:06 a.m.