pfa: Factor analysis for compositional data

Description Usage Arguments Details Value Author(s) References Examples

Description

Computes the principal factor analysis of the input data which are transformed and centered first.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pfa(
  x,
  factors,
  robust = TRUE,
  data = NULL,
  covmat = NULL,
  n.obs = NA,
  subset,
  na.action,
  start = NULL,
  scores = c("none", "regression", "Bartlett"),
  rotation = "varimax",
  maxiter = 5,
  control = NULL,
  ...
)

Arguments

x

(robustly) scaled input data

factors

number of factors

robust

default value is TRUE

data

default value is NULL

covmat

(robustly) computed covariance or correlation matrix

n.obs

number of observations

subset

if a subset is used

na.action

what to do with NA values

start

starting values

scores

which method should be used to calculate the scores

rotation

if a rotation should be made

maxiter

maximum number of iterations

control

default value is NULL

...

arguments for creating a list

Details

The main difference to usual implementations is that uniquenesses are nor longer of diagonal form. This kind of factor analysis is designed for centered log-ratio transformed compositional data. However, if the covariance is not specified, the covariance is estimated from isometric log-ratio transformed data internally, but the data used for factor analysis are backtransformed to the clr space (see Filzmoser et al., 2009).

Value

loadings

A matrix of loadings, one column for each factor. The factors are ordered in decreasing order of sums of squares of loadings.

uniqueness

uniqueness

correlation

correlation matrix

criteria

The results of the optimization: the value of the negativ log-likelihood and information of the iterations used.

factors

the factors

dof

degrees of freedom

method

“principal”

n.obs

number of observations if available, or NA

call

The matched call.

STATISTIC, PVAL

The significance-test statistic and p-value, if they can be computed

Author(s)

Peter Filzmoser, Karel Hron, Matthias Templ

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter (2008): Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

P. Filzmoser, K. Hron, C. Reimann, R. Garrett (2009): Robust Factor Analysis for Compositional Data. Computers and Geosciences, 35 (9), 1854–1861.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(expenditures)
x <- expenditures
res.rob <- pfa(x, factors=1)
res.cla <- pfa(x, factors=1, robust=FALSE)


## the following produce always the same result:
res1 <- pfa(x, factors=1, covmat="covMcd")
res2 <- pfa(x, factors=1, covmat=robustbase::covMcd(pivotCoord(x))$cov)
res3 <- pfa(x, factors=1, covmat=robustbase::covMcd(pivotCoord(x)))

robCompositions documentation built on Jan. 13, 2021, 10:07 p.m.