sfcheung / semfindr

A find(e)r of influential cases and outliers in SEM
https://sfcheung.github.io/semfindr/
GNU General Public License v3.0
1 stars 0 forks source link

Using scores to approximate case influence #46

Closed marklhc closed 1 year ago

marklhc commented 2 years ago

@sfcheung, I was going to reply to you about casewise likelihood, but when I saw your email, it made me think that there should be some ways to approximate the case influence without needing to rerun the models. I can think of one approach of using the scores given by lavaan::lavScores(), which gives the gradient of the individual loglikelihood with respect to the parameter vector. The results seem promising, and can be found in this vignette in the scores branch I just created. Would you take a look and see what you think? I think the approximation should be more accurate in large samples, and also is more needed in a large sample to avoid rerunning the model many times.

sfcheung commented 1 year ago

Thanks, @marklhc! It looks excellent! :smile: 👍 I will update other pages and docs to mention this method along with the conventional leave-one-out method.