Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

umxFactorScores

Return factor scores from a model as an easily consumable dataframe.


Description

umxFactorScores takes a model, and computes factors scores using the selected method (one of 'ML', 'WeightedML', or 'Regression') It is a simple wrapper around mxFactorScores. For missing data, you must specify the least number of variables allowed for a score (subjects with fewer than minManifests will return a score of NA.

Usage

umxFactorScores(
  model,
  type = c("ML", "WeightedML", "Regression"),
  minManifests = NA,
  return = c("Scores", "StandardErrors")
)

Arguments

model

The model from which to generate scores.

type

Method of computing the score ('ML', 'WeightedML', or 'Regression').

minManifests

The minimum number of variables not NA to return a score for a participant (Default = ask).

return

What to return (defaults to "Scores", which is what most users want, but can return "StandardErrors" on each score.

Value

  • dataframe of scores.

References

See Also

Other Reporting Functions: umxAPA(), umxGetParameters(), umxParameters(), umx_aggregate(), umx_time(), umx

Examples

m1 = umxEFA(mtcars, factors = 2)
x = umxFactorScores(m1, type = 'Regression', minManifests = 3)

# =========================================================================
# = histogram of F1 and plot of F1 against F2 showing they are orthogonal =
# =========================================================================
hist(x$F1)
plot(F1 ~ F2, data = x)

## Not run: 
m1 = umxEFA(mtcars, factors = 1)
x = umxFactorScores(m1, type = 'Regression', minManifests = 3)
x

## End(Not run)

umx

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.