computeScores | R Documentation |

Compute factor scores on the result of factor analysis method, the method is one of "mle", "pca", and "pfa".

```
computeScores(out, x = data, covmat = covmat, cor = cor, scoresMethod = scoresMethod)
```

`out` |
The result of factorScorePca(), factorScorePfa(), or factanal(). It is a list. |

`x` |
A numeric matrix. |

`covmat` |
A list with components: cov, center, and n.obs. |

`cor` |
A logical value indicating whether the calculation should use the covariance matrix ( |

`scoresMethod` |
Type of scores to produce, if any. The default is |

The output is a list. Except for the components of `out`

, it also has components:

`scoringCoef ` |
The scoring coefficients. |

`scores ` |
The matrix of scores. |

`meanF ` |
The sample mean of the scores. |

`corF ` |
The sample correlation matrix of the scores. |

`eigenvalues ` |
The eigenvalues of the running matrix. |

`covariance ` |
The covariance matrix. |

`correlation ` |
The correlation matrix. |

`usedMatrix ` |
The used matrix (running matrix) to compute |

`reducedCorrelation ` |
NULL. The reduced correlation matrix, reducedCorrelation is calculated in factorScorePfa.R. |

scoringCoef = F = meanF = corF = NULL if `scoresMethod = "none"`

.

Ying-Ying Zhang (Robert) robertzhangyying@qq.com

Zhang, Y. Y. (2013), An Object Oriented Solution for Robust Factor Analysis.

```
data("stock611")
stock604 = stock611[-c(92,2,337,338,379,539,79), ]
data = as.matrix(stock604[, 3:12])
factors = 2
cor = TRUE
scoresMethod = "regression"
covx = rrcov::Cov(data)
covmat = list(cov = rrcov::getCov(covx), center = rrcov::getCenter(covx), n.obs = covx@n.obs)
out = stats::factanal(factors = factors, covmat = covmat)
out = computeScores(out, x = data, covmat = covmat, cor = cor, scoresMethod = scoresMethod)
out
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.