I want to extract the individual group chi square values from lavaan
output that is provided when conducting multiple, known group sem models. Only the total chi square is provided as a fitMeasure
, and the chi square values are not treated as individual estimates in parameterEstimates
. There doesn't appear to be any other automated method for extracting this information.
I have been able to use the capture.output()
function, and from there I can find the heading for the chi square values, and count the number of lines of values based on the number of groups + 1. Then I can use strsplit()
to split on spaces and finally grab the value. I can write a function for this, but I don't want to reinvent the wheel here, so if anyone knows of a built-in argument or existing function I would be much obliged.