The forward search algorithm begins by selecting a homogeneous subset
of cases based on a maximum likelihood criteria and continues to add individual
cases at each iteration given an acceptance criteria. By default the function
will add cases that contribute most to the likelihood function and that have
the closest robust Mahalanobis distance, however model implied residuals
may be included as well.
Usage
forward.search(data, model, criteria = c("GOF", "mah"), n.subsets = 1000,
p.base = 0.4, print.messages = TRUE, ...)
## S3 method for class 'forward.search'
print(x, ncases = 10, stat = "GOF", ...)
## S3 method for class 'forward.search'
plot(x, y = NULL, stat = "GOF",
main = "Forward Search", type = c("p", "h"), ylab = "obs.resid", ...)
Arguments
data
matrix or data.frame
model
if a single numeric number declares number of factors to extract in
exploratory factor analysis. If class(model) is a sem (semmod), or lavaan (character),
then a confirmatory approach is performed instead
criteria
character strings indicating the forward search method
Can contain 'GOF' for goodness of fit distance, 'mah' for Mahalanobis
distance, or 'res' for model implied residuals
n.subsets
a scalar indicating how many samples to draw to find
a homogeneous starting base group
p.base
proportion of sample size to use as the base group
print.messages
logical; print how many iterations are remaining?
...
additional parameters to be passed
x
an object of class forward.search
ncases
number of final cases to print in the sequence
stat
type of statistic to use. Could be 'GOF', 'RMR', or 'gCD' for
the model chi squared value, root mean square residual, or generalized Cook's distance,
respectively
y
a null value ignored by plot
main
the main title of the plot
type
type of plot to use, default displays points and lines
ylab
the y label of the plot
Details
Note that forward.search is not limited to confirmatory factor analysis and
can apply to nearly any model being studied
where detection of influential observations is important.