how I can define the regression models and calculate direct and indirect effects?
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/d46747c0-a149-4f3b-8d27-58896f6ba04d%40googlegroups.com.
Thanks for your reply.Yes, I have done this lavaan example before. But my problem is that I have two ordinal mediators and two responses. With one X. Having this data, how I can define my modles and lable direct and indirect effects?I appreciate your help.Farideh
On Mon, Nov 18, 2019, 15:53 Terrence Jorgensen <tjorge...@gmail.com> wrote:
--how I can define the regression models and calculate direct and indirect effects?Is your question specifically about lavaan syntax or about SEM in general?You can find lavaan examples of mediation syntax here: http://lavaan.ugent.be/tutorial/mediation.htmlYou can find Cole & Maxwell's (2003) discussion of "half-longitudinal" designs, which match your situation, here: https://doi.org/10.1037/0021-843X.112.4.558Terrence D. JorgensenAssistant Professor, Methods and StatisticsResearch Institute for Child Development and Education, the University of Amsterdam
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.
my problem is that I have two ordinal mediators and two responses. With one X. Having this data, how I can define my modles and lable direct and indirect effects?
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/080b0130-1ae2-482f-847f-d8c82cbb3ac3%40googlegroups.com.
It seems I can't have two y2 as a response in the code
foo ~ myLabel*bar + 1?bar # first assigns a label, second assigns a starting valueI have defined as a vector of ordered variables, but I got an error.
model <- ' # regressions
MA1 ~ X # ad hoc
MB1 ~ X # ad hoc
Y ~ X # ad hoc
MA2 ~ a1*X + MA1
MB2 ~ a2*X + MB1
Y2 ~ c*X + Y1 + b1*MA1 + b2*MB1
# residual covariances at Time 1
Y1 ~~ MA1 + MB1
MA1 ~~ MB1
# residual covariances at Time 2
Y2 ~~ MA2 + MB2
MA2 ~~ MB2
# define indirect effects
ab1 := a1*b1
ab2 := a2*b2
Indirect := ab1 + ab2
Total := c + Indirect
Prop := Indirect/Total
'
It helps to paste the error messages. But I'm guessing the issue is you have exogenous ordered variables (MA1 and MB1). To avoid that, I think the most parsimonious solution would be to regress those on X as well. In your case, it wouldn't change the interpretations of other parameters, and it would be a simple way to make the ordinal variables endogenous.
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/fb94704b-63b3-4bf8-b9d3-70a22c175003%40googlegroups.com.
1 ) Regarding your suggestion to regress the mediators on X, does it work for both continuous and dichotomous mediators?I mean, my mediators originally were continuous, and I recoded them to low, normal and high( it is a biological factor). So, it wouldn't matter I use continuous or dichotomous mediators?
2 ) one of the mediators was almost constant( all normal case, but one), that's why I got an error in the previous code.
But I am wondering, why we don't use multinomial or logistic regression in our model when our mediators are not continuous in lavaan package with the sem function?
3) in order to have the path diagram of the model, which code goes with sem function and lavaan package?
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/f2497587-72c0-4cc7-a011-f866a92c694b%40googlegroups.com.
1 ) do you think I should drop the second mediator of the model?
and when I used the first ordered mediator ( I dropped the constant mediator) I got the following results: ( the mediator sample size is 32)
2 ) Why I don't have AIC, BIC anymore? and rather, I have Robust RMSEA?
3 ) shall I explain that the second mediator should be excluded from the model because the model does not fit? and of course, it is not the case to report for a paper?
4) How can I use Robust ML to cover the non-normal data?
5) which condition on data should be met to use SEM, which data exploration techniques?
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/00cac37f-8544-4a96-8510-4a1c60656065%40googlegroups.com.
The two mediators are continuous with one outlier at time point two
fit <- sem(model, data=data,estimator = "MLR", missing = "FIML")
Model Test User Model:Standard Robust
Test Statistic 5.678 8.333
Degrees of freedom 4 4
P-value (Chi-square) 0.225 0.080
Scaling correction factor 0.681
for the Yuan-Bentler correction (Mplus variant)
Robust Comparative Fit Index (CFI) 0.876
Robust Tucker-Lewis Index (TLI) 0.351
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -935.559 -935.559 it was -331.793
Scaling correction factor 1.239
for the MLR correctionLoglikelihood unrestricted model (H1) -932.720 -932.720 it was -328.456
Scaling correction factor 1.172
for the MLR correction
Akaike (AIC) 1929.119 1929.119 it was 709.586
Bayesian (BIC) 2026.867 2026.867 744.006
Sample-size adjusted Bayesian (BIC) 1934.972 1934.972 672.264
Robust RMSEA 0.059
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.115
Standardized Root Mean Square Residual:
SRMR 0.057 0.057
Defined Parameters:
Estimate Std.Err z-value P(>|z|)
ab1 0.014 0.035 0.404 0.686
ab2 0.012 0.020 0.590 0.555
Indirect 0.026 0.042 0.621 0.535
Total -0.021 0.048 -0.439 0.661
Prop -1.213 4.223 -0.287 0.774 it is "inconsistent mediation", right ?????
lavResiduals(fit) ** How we can interpret this table? which kind of numbers shows a good fit?$type
[1] "cor.bentler"
$cov
Crt_T1 H_T1 PRA1 Crt_T2 H_T2 PRA2 chronic st
Cortisol_T1 0.003
H_T1 0.002 0.001
PRA1 -0.013 -0.004 0.000
Cortisol_T2 0.035 0.133 0.104 0.030
H_T2 -0.027 -0.001 0.268 0.071 0.007
PRA2 -0.003 0.020 0.019 0.018 0.004 0.003
chronic st -0.002 -0.002 0.000 0.008 0.017 -0.001 0.000
$mean
Cortisol_T1 H_T1 PRA1 Cortisol_T2 H_T2 PRA2 chronic st
-0.002 -0.004 0.000 0.039 0.055 0.001 0.000
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/5b1a222a-7f3b-4119-830d-b983a85d21b4%40googlegroups.com.
1) what would be the effect of time on this mediation, I mean how we can interpret these results in terms of time?
2 ) Is it possible to find out which time interval would be better, or what would be the right time to do these questionnaires on pregnant women ( our participants)?
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/d63b1552-1492-4a6f-bbec-3c97302333fa%40googlegroups.com.
2 ) the proportion of indirect effect in my model was 1.542 and you said maybe my model is not properly defined.
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/42744b70-4da1-4aa8-bde8-67192a79c803%40googlegroups.com.