Initially, the script run without problem. However, when I opened R again and I tried to run the same code, I get the following message:
lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigatelavaan WARNING: syntax contains parameters involving exogenous covariates; switching to fixed.x = FALSE
The code is
# CENTRANDO LOS DATOS
SME <- SME %>% mutate_at(vars(lnTam, INNSUPP, MAMB), funs(c=scale))
# create interaction term between centered X (socst) and W (math)
SME <- SME %>% mutate(INNSUPP_x_lnTam = INNSUPP_c * lnTam_c)
# parameters
moderation_model <- '
# regressions
MAMB ~ b1*INNSUPP_c
MAMB ~ b2*lnTam_c
MAMB ~ b3*INNSUPP_x_lnTam
# define mean parameter label for centered math for use in simple slopes
lnTam_c ~ lnTam.mean*1
# define variance parameter label for centered math for use in simple slopes
lnTam_c ~~ lnTam.var*lnTam_c
# simple slopes for condition effect
SD.below := b1 + b3*(lnTam.mean - sqrt(lnTam.var))
mean := b1 + b3*(lnTam.mean)
SD.above := b1 + b3*(lnTam.mean + sqrt(lnTam.var))
'
# fit the model using nonparametric bootstrapping (this takes some time)
sem1 <- sem(model = moderation_model,
data = SME,
se = "bootstrap",
bootstrap = 1000)
# fit measures
summary(sem1, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
#compute bias-corrected estimates of bootstrapped confidence intervals
parameterEstimates(sem1, boot.ci.type = "bca.simple",
level = .95, ci = TRUE, standardized = FALSE)
```
Thank you very much in advance!!!