Learn R Programming

FAiR (version 0.2-0)

read.cefa: Read Files Produced by the Comprehensive Exploratory Factor Analysis (CEFA) Software Package

Description

This function tries to import files produced by CEFA Version 2.0 by Michael W. Browne, Robert Cudeck, Krishna Tateneni, and Gerhald Mels so that they can then be used in R.

Usage

read.cefa(file)
read.CEFA(file)

Arguments

file
Character string giving the path to the file to be imported.

Value

  • If a raw dataset is imported, read.cefa returns a dataframe with columns as variables. Such a dataframe can be passed to the data argument of Factanal. If a covariance matrix is imported, read.cefa returns a two-element list with the following items:
  • covThe covariance matrix
  • n.obsNumber of observations
  • This list can be passed to the covmat argument of Factanal.

Details

read.cefa does not support importing a matrix of factor loadings, (Datatype 3 in CEFA) because the file does not include enough information to be useful to FAiR. Instead, import the covariance matrix (Datatype 1 in CEFA) or the raw dataset (Datatype 2 or 4 in CEFA) and use Factanal to reestimate the model. read.CEFA is just an alias for read.cefa. These functions have not been tested very much and may fail if the file being imported does not strictly adhere to the file format described in the CEFA documentation.

References

CEFA is available for Windows (but also runs under Wine) from http://faculty.psy.ohio-state.edu/browne/software.php

See Also

See the foreign library for functions to import files created by SPSS, SAS, etc. and read.table for a function to import delimited text files and read.fwf for a function to import fixed-width text files.

Examples

Run this code
OrgComm <- read.cefa(file = file.path("Program Files", "CEFAtool" "OrgComm.inp"))

Run the code above in your browser using DataLab