Compute Goodness of Fit distances between models when removing the \(i_{th}\) case. If mirt is used, then the values will be associated with the unique response patterns instead.
GOF(data, model, M2 = TRUE, progress = TRUE, ...)# S3 method for GOF
print(x, ncases = 10, digits = 5, ...)
# S3 method for GOF
plot(
x,
y = NULL,
main = "Goodness of Fit Distance",
type = c("p", "h"),
ylab = "GOF",
absolute = FALSE,
...
)
matrix or data.frame
if a single numeric number declares number of factors to extract in
exploratory factor analysis (requires complete dataset, i.e., no missing).
If class(model)
is a sem (semmod), or lavaan (character),
then a confirmatory approach is performed instead. Finally, if the model is defined with
mirt::mirt.model()
then distances will be computed for categorical data with the
mirt package
logical; use the M2 statistic for when using mirt objects instead of G2?
logical; display the progress of the computations in the console?
additional parameters to be passed
an object of class GOF
number of extreme cases to display
number of digits to round in the printed result
a NULL
value ignored by the plotting function
the main title of the plot
type of plot to use, default displays points and lines
the y label of the plot
logical; use absolute values instead of deviations?
Phil Chalmers rphilip.chalmers@gmail.com
Note that GOF
is not limited to confirmatory factor analysis and
can apply to nearly any model being studied
where detection of influential observations is important.
Chalmers, R. P. & Flora, D. B. (2015). faoutlier: An R Package for Detecting Influential Cases in Exploratory and Confirmatory Factor Analysis. Applied Psychological Measurement, 39, 573-574. tools:::Rd_expr_doi("10.1177/0146621615597894")
Flora, D. B., LaBrish, C. & Chalmers, R. P. (2012). Old and new ideas for data screening and assumption testing for exploratory and confirmatory factor analysis. Frontiers in Psychology, 3, 1-21. tools:::Rd_expr_doi("10.3389/fpsyg.2012.00055")
gCD
, LD
, obs.resid
,
robustMD
, setCluster