coefa_fixdia {coefa}R Documentation

Fix(Replace) the diagonal values in the matrix

Description

The diagonal of the matrix is replaced by 1 ,so that the matrix can be tested for KMO and Bartlett's test.

Usage

coefa_fixdia(x,test=FALSE,sz)

Arguments

x

A matrix that needs to replace the value of the diagonal in matrix.

test

A logical value.If test=TRUE,KMO and Bartlett's test will be done.

sz

The total sample sizes of include studies.

Details

The diagonal of the similarity matrix will be adjusted by this function, COEFA results will be more accurate, and KMO and Bartlett' Test tests can be carried out.

If test=FALSE,you will obtain a more accurate result without KMO and Bartlett's test. If test= TRUE ,you would obtain a result containing KMO and Bartlett's Test ,similarity matrix fixed.

Value

A matrix or a list containing KMO and Bartlett's test.

Examples

#similarity matrix——matrices_acm
fixedsmatrix<-coefa_fixdia(matrices_acm,sz=100)

[Package coefa version 1.0.3 Index]