2

I need to calculate a very simple regression model outcome ~ predictor. To treat missings, I have to use FIML and also I need bootstrapping. Since the lavaan package in R provides both, I used this code:

model <- sem('outcome ~  predictor', data = data, missing = "FIML", se="BOOTSTRAP", bootstrap = 2000, fixed.x = F)
summary(model)

Unfortunately, in this structural equation modeling approach, no $R^2$ or adjusted $R^2$ is available in the output. Can someone tell me how I can obtain an equivalent measure that indicates an effect size? If there's a simpler approach than using lavaan which provides FIML, bootstrapping, and effect size output for an univariate regression? That would be even better.

Madamadam
  • 197

1 Answers1

0

I don't understand at all why you need a SEM for this model. If you are using a simple regression, why not just simply use OLS? Seems the only reason this was employed, based off the question, was to deal with missingness and bootstrapping. Both can be accomplished without relying on a complicated SEM (such as using multiple imputation and bootstrapped estimates), which may not be important for your use case.

Edit

My point was not that the SEM itself is complicated. As I already noted, it is quite straightforward here. The only real thing I saw was an overcomplication of how to obtain everything for the regression if it is straightforwardly accomplished using OLS. But coming back to this question, I suppose this approach would make sense if, as jsakaluk noted, one is committed to using FIML and wants some simpler code. As noted in the above comments, one can easily obtain the $R^2$ with the code inspect(model, "rsquare").

  • 2
    What, exactly, is complicated about this hypothetical SEM? The model itself is simple. The code gives the user exactly what they want (model specification + model fitting + missing data treatment + bootstrapping), all in one line of code. Since you mention OLS, is it mostly a matter of different properties of each estimator? And if so, I'm curious what differences you're attuned to that seem that large/the complexity introduce that substantial, vs. the other streamlining benefits of using lavaan in this instance? – jsakaluk Mar 07 '24 at 16:23
  • Yes, I support @jsakaluk: my advicer for statistics recommended FIML because it's so straight forward and easy in comparison to multiple imputation. Therefore I chose a SEM framework. – Madamadam Mar 07 '24 at 17:02
  • @jsakaluk see edit. – Shawn Hemelstrand Mar 07 '24 at 20:01
  • I read @Madamadam's question as after an alternative/simpler approach that would still provide FIML/bootstrapping, vs. merely describing that lavaan provides these features (as an aside to requesting an alternative). And so, I get that if one just wanted a generic regression, the additions of FIML and bootstrapping would seem "extra". But in this case--and if my understanding of madamadam's needs are correct--FIML and bootstrapping seem germane to the OP's question, and therefore, an answer would need to provide an alternative approach that still maintains these features. – jsakaluk Mar 11 '24 at 14:52
  • Yes, it's essential for me to get FIML and bootstrapping, if someone can show, how to get it with a simpler framework like lm(), that would be great. – Madamadam Mar 12 '24 at 17:12