WillemSleegers / tidystats

R package to save and report the output of statistical models.
https://willemsleegers.github.io/tidystats/
Other
19 stars 3 forks source link

Add support for lavaan #6

Open WillemSleegers opened 3 years ago

WillemSleegers commented 3 years ago

Check it out whether it fits in my current framework.

WillemSleegers commented 3 years ago

Maybe check it out in combination with the tidySEM package.

sannevanderven commented 3 years ago

Hi Willem, thanks for your great talk yesterday! You made a really useful package there.

You also asked to specify here what output from lavaan is needed the most. Like with lm(), in lavaan you first run a model, then get your output with summary(). But the output is still quite a lot in different categories. The most important output are the fit measures and the parameter estimates. You can also extract only those with fitMeasures(), this is actually from the semTools package, and with parameterEstimates() from lavaan itself. As for the specific measures, there are quite a lot of fit measures, but I think it's safest to include all of them to let everyone decide to pick and report what they prefer. Although you might want to leave out the baseline chisq, baseline df and baseline p.value, I'd say they only lead to confusion, as you want to report the model chisq, df and p.value, not the baseline. The parameter estimates that are most generally reported are est, se, p.value and std.all (you extract the latter one by specifying standardized=T). But generally parameter estimates are reported in a figure, not in running text.

Hope this helps and keep up the good work! Feel free to approach me if you have more questions.

Best, Sanne

WillemSleegers commented 3 years ago

Hey Sanne, thanks for your comments! This is quite helpful.

Do you have a few examples for me of published work that I could use to see how the reporting typically happens?

WillemSleegers commented 3 years ago

Update: Made some progress extracting the output from the models. Will probably continue with adding support for reporting it in Word next.

On my to do list: