yrosseel/lavaan

Feature request: add baseline.model argument to summary()

Opened this issue · 4 comments

As of version 0.6-18, fitMeasures() takes a baseline.model argument to adjust the computation of GFI et al., but summary() does not. It is thus not possible to obtain the correct comparison-based fit measures in the summary output if a custom baseline model is needed. As far as I can tell, the baseline model could just be passed from lav_object_summary() to lav_fit_measures().

I will look into it. But I don't want to add another argument to summary(). It will go into the fm.args() argument, which collects everything related to fit measures. This requires a little bit more work, as baseline.model is not part of fm.args() in fitMeasures()...

Yves, I had an idea about this. Just as the standardized= argument can now be a character string (and the old FALSE implies an empty string), the fit.measures= argument could now be a list() of arguments (besides fm.args=) that get passed to fitMeasures(). TRUE or FALSE implies an empty list.

I can work on a PR if you like this idea.

Same idea with passing args to modIndices() via the summary(modindices=) argument, BTW.

Ok, that sounds good. I suppose that we would have to remove the fm.args= argument (in the summary() method) (perhaps after a deprecation period)? All that information could go in the 'list()' for fit.measures. Or would you keep the fm.args= argument?

And indeed, we could do this for modindices= too.