I have built SEM model in R using Lavaan. My aim is to report on the indirect effect.
The data I am using is confidential, so I will not be able to share it or provide a reproducible example. Since I am focused on the interpretation of the results, I don't think a reproducible example will be necessary. I will also provide some code and hypothetical results for simplicity.
To give some background, I am interested in the effect of two strains of a virus on severity (hospitalisation). And I am interested in how SES (income and education) mediates this relationship. I created a latent variable based on income and education. The part which makes this tricky for me to understand is that both my exposure (variant -> 1 = variant 1, 0 = variant 2) and outcome (hospitlaisation -> 1 = hosp, 0 = not hosp) are binary. SES variables are quintiles (Q1 = most educated / highest income) which were coded as numeric to work with Lavaan. All the examples I see online use numeric variables.
library(tidyverse, lavaan) full_model <- ' latent_ses =~ income_q + educ_q status_hosp ~ a1*variant + b1*latent_ses + age + sex_Male + vaccination + comorbidities latent_ses ~ c1*variant direct_modl := a1 ses_modl := b1 indirect_modl := c1*b1 total_model := a1 + c1*b1 ' model.fit1_full <- sem(full_model, data= d_o, ordered="status_hosp") parameter_est <- parameterEstimates(model.fit1_full, ci = TRUE, level = 0.95, boot.ci.type = 'perc') %>% select(label, est, se, pvalue, ci.lower, ci.upper) %>% filter(label == 'indirect_modl' |label == 'direct_modl' | label == 'ses_modl' | label == 'total_model') fit_meas <- fitMeasures(model.fit1_full, c("cfi", 'tli', 'rmsea', "srmr")) %>% as.data.frame() %>% t()
Let's assume measures of fit(cfi, tli, rmsea, srmr) all appear to be good and latent variable loads well. Some hypothetical results are presented below. I will provide two hypothetical model representing scenarios where the direct effect and indirect effect are of same sign (direction) and of different.
Hypothetical result #1 > parameter_estimate label est se pvalue 1 direct_modl -0.50 0.05 0 2 ses_modl 0.25 0.04 0 3 indirect_modl -0.12 0.01 0 4 total_model -0.62 0.05 0 Hypothetical result #2 > parameter_estimate label est se pvalue 1 direct_modl -0.50 0.05 0 2 ses_modl 0.29 0.04 0 3 indirect_modl 0.10 0.01 0 4 total_model -0.40 0.05 0
My questions are:
- How can I interpret these results (specifically the indirect effect!) given that the outcome and exposure variables are binary.
- Is it right to be exponentiating the estimates given the outcome is binary (as with logistic model) Thanks in advance!