sem-in-r / seminr

Natural feeling domain-specific language for building structural equation models in R for estimation by covariance-based methods (like LISREL/Lavaan) or partial least squares (like SmartPLS)
58 stars 19 forks source link

Problems in using the specific effect significance function in multiple mediating constructs #338

Open samirnemechaves opened 1 year ago

samirnemechaves commented 1 year ago

Good morning, I am using the package to perform a pls-pm analysis, now I am analyzing the specific significant effects of the indirect effects of a model that has several variables. I have used the concatenant “c()” as suggested in the book, and I have been careful to heed the notice "Currently only serial mediation with 4 mediator variables is allowed." Despite this, it seems that the expected calculations were not made since the result of the analysis is zero in all indicators To check the error, I have tried doing it with a single variable and it works well.

Taking this into account, my question is: What can I do to analyze the model I present? knowing that testing indirect effects one by one can lead to errors.

Thank you very much for your help.

model2

EGL_mm2 <- constructs( composite("MATE",multi_items("M",c(4,5,7))), composite("INVOL",multi_items("INV",c(1,2,4,5,6))), composite("CONOC",multi_items("CON",c(1,2,4,6))), composite("ESNOB",multi_items("ES",c(3,4,6))), composite("BANDW",multi_items("BND",c(1:6))), composite("VEBLEN",multi_items("VEB",c(3,4,5,6,7))), composite("HEDONIC",multi_items("HED",c(2:7))), composite("PERF",multi_items("PERF",c(1,2,4,5))), composite("INTENC",multi_items("INT",c(1:4))))

Estimate model 2

EGL_model2 <- estimate_pls(data = df2, measurement_model = EGL_mm2, structural_model = EGL_sm)

summary model results

summary_EGL_model2<- summary(EGL_model2)

bootsTrap

bootstrap_EGL_model2<- bootstrap_model(seminr_model= EGL_model2,nboot= 1000) sum_bootstrap_EGL_model2 <- summary(bootstrap_EGL_model2, alpha = 0.10)

Indirect effects

summary_EGL_model2$total_indirect_effects

evaluate the importance of indirect effects

MATE

specific_effect_significance(boot_seminr_model = bootstrap_EGL_model2, from = "MATE", through = c("ESNOB","BANDW","VEBLEN","HEDONIC"),
to = "INTENC", alpha = 0.05)

This is the result when I run the code

Original Est. Bootstrap Mean Bootstrap SD T Stat. 2.5% CI 97.5% CI 0 0 0 NaN 0 0

check the error, use a single variable

specific_effect_significance(boot_seminr_model = bootstrap_EGL_model2, from = "MATE", through = c("ESNOB"),
to = "INTENC", alpha = 0.05)

This is the result when I run the code

Original Est. Bootstrap Mean Bootstrap SD T Stat. 2.5% CI 97.5% CI -0.0013600626 -0.0008870219 0.0079466835 -0.1711484588 -0.0189184321 0.0156957821

soumyaray commented 1 year ago

Hi @samirnemechaves I can help you look into this. But before fully investigating why you are getting a "NaN" result, I want to point out that even after one mediation the indirect effect is -0.001. After two or three more mediations, it will be likely around 0.00001 or smaller – that effect is essentially zero. One suspicion is that your mediated effect is so close to zero that that trying to compute a T statistic (note the SD is also tiny) is getting close to a division by zero, causing the error. You can see if this is the case by progressively adding one more mediator at a time to the specific_effect_significance function. I think it is safe to simply say the four-times mediation is producing nearly a zero effect and so there can be no hope of anything remotely significant.

Let me know if you want me to pursue it further: it will help if can email me (email in my profile info) your data so I can confirm things on your code+data combination. I will ensure to delete your data as soon as this issue is resolved.

samirnemechaves commented 1 year ago

Thank you very much for your help, I understand what you mean, I had not thought about it that way and that is probably the reason, of course, I will send you the email with what you requested

Again, thank you very much