MyNixOS website logo
Description

Meta Analysis of Factor Analysis Based on CO-Occurrence Matrices.

Provide a series of functions to conduct a meta analysis of factor analysis based on co-occurrence matrices. The tool can be used to solve the factor structure (i.e. inner structure of a construct, or scale) debate in several disciplines, such as psychology, psychiatry, management, education so on. References: Shafer (2005) <doi:10.1037/1040-3590.17.3.324>; Shafer (2006) <doi:10.1002/jclp.20213>; Loeber and Schmaling (1985) <doi:10.1007/BF00910652>.

coefa

The goal of coefa is to provide a calculation program for the method of Meta Analysis of Factor Analysis Based on Co-occurrence Matrices. The coefa package is an effective tools which can be used to solve the factor structure (i.e. inner structure of a construct, or scale) debate in several disciplines, such as psychology, psychiatry,management,education et al.

Installation

You can install the development version of coefa like so:

install.packages("coefa")

Usage

This is a basic example which shows you how to solve a inner structure debate:

Read

First, the factor loading matrices data from a line of primary studies should be imported into the R environment.These data(factor loading matrices) should be stored using the type of list in R.This work can be executed manually or using using the coefa_read()function of the coefa package.

library(coefa)
#> 载入需要的程辑包:openxlsx
#> 载入需要的程辑包:psych

The function coefa_read() provides an effective way to read data files from a folder in a computer. The user can read several types of files by specifying the parameters of the function. What should be noted is that the miss values in data files will be replaced with the number of 0.

#Supposing that the type of data are xlsx files.
matrices.withoutNa<-coefa_read(type = "xlsx")

**NOTE: Although thecoefa_read() function can help you quickly read the data in the folder, there are two points should be noted: (1) The path of the stored file should be consistent with your workspace. (2) The file in the folder should have the same file formats, and different files should be set with different parameters.

Trim factor loading matrices

In the step, all the factor loading matrices will be trimmed using the Shafer’s(2005) method or the Loeber and Schmaling’s method (1985). And the cutoff values(e.g., 0.3, 0.4, 0.5) can be given here according to the users’ consideration.

#Suppose matrices.withoutNa is obtained by coefa_read function
mx1<-matrix(c(0.1,0.2,0.3,0.4,0.5,0.6),nrow = 3,byrow = TRUE)
mx2<-matrix(c(0.6,0.5,0.4,0.3,0.2,0.1),nrow = 3,byrow = TRUE)
matrices.withoutNa<-list(mx1,mx2)
#Take the Loeber&Schmaling(1985) method, the cutoff value is 0.4 as an example.The result is that values in the matrix greater than or equal to 0.4 will become 1, and less than 0.4 will become 0.
matrices.tflm<-coefa_tflm(matrices.withoutNa,methodE = "ls",cutoff = 0.4)

Generate co-occurrence matrices

In this step, the function coefa_gcm() will be used to generate the co-occurrence matrix.

matrices.gcm<-coefa_gcm(matrices.tflm)

Aggregate co-occurrence matrices

In this step, aggregated co-occurrence matrix will be obtained using the coefa_acm() in which the aggregation algorithm will be executed. Here, you can set the parameter samplesize = TURE to add the weights to all studies. The sample sizes will be valued by the sz1 variable If samplesize = FALSE, no weight will be considered in the aggregation process. When this step finished, a final aggregated co-occurrence matrix (weighted or unweighted by sample size) will be calculated.

#Assume that the sample sizes of the factor loading matrices for the two studies are 100 and 200, respectively.
sz1<-c(100,200)
matrices.acm<-coefa_acm(matrices.gcm,sz=sz1,samplesized=TRUE)

Summary

The function coefa_summary() provides a preliminary screening and suggestion for the later factor analysis. The results of Scree plot and Kaiser’s criterion will be plotted by this function. Furthermore, this function will test the aggregated co-occurrence matrix, and return that whether it is a positive matrix not.

coefa_summary(matrices.acm,fa="pc")

Factor analysis

Finally, the function coefa_fa will provide the choice for factor extraction under the condition of co-occurrence matrix. The MDS, EFA, PCA can be a choice, and the function will generate a plot for your choice. A typical setting comes as follows.

coefa_fa(matrices.acm,nfactors = 6,methodcoefa = "EFA",rotate = "varimax",fm="pa")
Metadata

Version

1.0.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows