I need to print the lavaan SEM summary results to latex with R. Does anyone know how to do that?
desorg.model <- '
# latent variable
lat_control =~ cv71_rec_mean + cv72_rec_mean + cv73_rec_mean + cv74_rec_mean + cv8_rec_mean
# Dependent variables
morto ~ lat_control + Reincidente + nReds + monoparentalidade + defasagem_escolar + ICE
preso ~ lat_control + Reincidente + nReds + monoparentalidade + defasagem_escolar + ICE
n_preso ~ lat_control + Reincidente + nReds + monoparentalidade + defasagem_escolar + ICE
'
# Fit the model to the data
desorg.fit <- sem(desorg.model, data = model_df)
# Get the summary output
summary(desorg.fit, standardized = TRUE, fit.measures = TRUE, rsquare = TRUE)
fitmeasures(desorg.fit, c("cfi", "tli", "rmsea"))