cjvanlissa / tidySEM

54 stars 7 forks source link

blavaan support #37

Closed NielsSkovgaard-Olsen closed 2 years ago

NielsSkovgaard-Olsen commented 2 years ago

nice package!

It works super for lavaan objects. When I tried with blavaan, I got an error message - and by browsing through the R functions, it did not appear that tidySEM applies to blavaan objects.

Is there a way of getting around this (if my impression is accurate) - e.g. by converting a blavaan object to an lavaan object and applying tidySEM to it (or otherwise extracting the information from the blavaan object that tidySEM needs)?

Thanks in advance! Niels

cjvanlissa commented 2 years ago

What is required for this is a function table_results.blavaan(). That would allow most functions to work with blavaan. I have no experience with blavaan, but if it is close to the lavaan object then it would likely be easy to adapt the function table_results.lavaan(). You can find its code here: https://github.com/cjvanlissa/tidySEM/blob/78978307c8b7189aad4be17cb7d6c6d45252e25a/R/results-table_results.R#L509

If you want to take a crack at that, I would welcome a contribution to the package!