Last data update: 2014.03.03

R: Example Factor Analysis Data
factorExample1R Documentation

Example Factor Analysis Data

Description

Data set used in some of OpenMx's examples.

Usage

data("factorExample1")

Format

A data frame with 500 observations on the following variables.

x1
x2
x3
x4
x5
x6
x7
x8
x9

Details

This appears to be a three factor model, but perhaps with an odd loading structure.

Source

Simulated

References

The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.

Examples

data(factorExample1)
round(cor(factorExample1), 2)

factanal(covmat=cov(factorExample1), factors=3, rotation="promax")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(OpenMx)
Loading required package: digest
Loading required package: MASS
Loading required package: Matrix
Loading required package: Rcpp
Loading required package: parallel

Attaching package: 'OpenMx'

The following objects are masked from 'package:Matrix':

    %&%, expm

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/OpenMx/factorExample1_data.Rd_%03d_medium.png", width=480, height=480)
> ### Name: factorExample1
> ### Title: Example Factor Analysis Data
> ### Aliases: factorExample1
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(factorExample1)
> round(cor(factorExample1), 2)
     x1   x2   x3   x4   x5   x6   x7   x8   x9
x1 1.00 0.42 0.18 0.31 0.40 0.68 0.72 0.58 0.44
x2 0.42 1.00 0.16 0.31 0.74 0.49 0.48 0.46 0.71
x3 0.18 0.16 1.00 0.43 0.15 0.17 0.17 0.27 0.17
x4 0.31 0.31 0.43 1.00 0.28 0.36 0.36 0.61 0.30
x5 0.40 0.74 0.15 0.28 1.00 0.47 0.49 0.44 0.74
x6 0.68 0.49 0.17 0.36 0.47 1.00 0.84 0.70 0.48
x7 0.72 0.48 0.17 0.36 0.49 0.84 1.00 0.74 0.51
x8 0.58 0.46 0.27 0.61 0.44 0.70 0.74 1.00 0.43
x9 0.44 0.71 0.17 0.30 0.74 0.48 0.51 0.43 1.00
> 
> factanal(covmat=cov(factorExample1), factors=3, rotation="promax")

Call:
factanal(factors = 3, covmat = cov(factorExample1), rotation = "promax")

Uniquenesses:
   x1    x2    x3    x4    x5    x6    x7    x8    x9 
0.428 0.296 0.810 0.005 0.220 0.214 0.103 0.284 0.287 

Loadings:
   Factor1 Factor2 Factor3
x1  0.757                 
x2          0.822         
x3                  0.436 
x4                  1.037 
x5          0.906         
x6  0.899                 
x7  0.993                 
x8  0.639           0.322 
x9          0.826         

               Factor1 Factor2 Factor3
SS loadings      2.783   2.183   1.383
Proportion Var   0.309   0.243   0.154
Cumulative Var   0.309   0.552   0.705

Factor Correlations:
        Factor1 Factor2 Factor3
Factor1   1.000  -0.511  -0.394
Factor2  -0.511   1.000   0.617
Factor3  -0.394   0.617   1.000

The degrees of freedom for the model is 12 and the fit was 0.0247 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>