Warning messages


I am running a cross-lagged path model and have gotten the following warning messages:
Warning messages:
1: In lav_data_full(data = data, group = group, cluster = cluster, :
lavaan WARNING: 15 cases were deleted due to missing values in
exogenous variable(s), while fixed.x = TRUE.
2: In data.matrix(data[case.idx[[g]], ov.idx, drop = FALSE]) :
NAs introduced by coercion
3: In data.matrix(data[case.idx[[g]], ov.idx, drop = FALSE]) :
NAs introduced by coercion
4: In lavaan::lavaan(model = painhrAMod, data = flacchrvafinal, missing = "FIML", :
lavaan WARNING: syntax contains parameters involving exogenous covariates; switching to fixed.x = FALSE

I was wondering if these warnings were impacting my results, and if anyone knows how to fix the NAs introduced by coercion? Also with the warning involving exogenous covariates, how do I add the fixed.x=FALSE to my syntax. Below is what my syntax looks like right now:

painhrAMod <- 'hr5 ~ hr4+flacc4+hrb+nap
flacc5 ~ flacc4+hr4+flaccb+nap
hr4 ~ hr3+flacc3+hrb+nap
flacc4 ~ flacc3+hr3+flaccb+nap
hr3 ~ hr2+flacc2+hrb+fed+nap
flacc3 ~ flacc2+hr2+flaccb+fed+nap
hr2 ~ hr1+flacc1++hrb+fed+nap
flacc2 ~ flacc1+hr1+flaccb+fed+nap
hr1 ~ hr0+flacc0+hrb+fed+nap
flacc1 ~ flacc0+hr0+flaccb+fed+nap
hr0 ~ hrb+flaccb+fed+nap
flacc0 ~ flaccb+hrb+fed+nap
flaccb ~~ hrb
flacc0 ~~ hr0
flacc1 ~~ hr1
flacc2 ~~ hr2
flacc3 ~~ hr3
flacc4 ~~ hr4
flacc5 ~~ hr5'

painhrAFit <- sem(painhrAMod, data=flacchrvafinal, missing="FIML", estimator="MLR", std.lv=T)

summary(painhrAFit, fit.measures=T,standardized = T)

The documentation for sem() under ... says you can specify additional options using name=value. Then the documentation for lavOptions includes fixed.x=FALSE. So just put fixed.x=FALSE in your call to sem(), I think. This might fix all these warnings, possibly.

If you include some data (using dput()) we can run your example.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.