Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Group level SEM relationships on soil moisture and external factors

47 views
Skip to first unread message

Kwabena A. Nketia

unread,
Sep 27, 2018, 11:16:38 AM9/27/18
to lavaan
Dear All,

I am working on soil moisture and trying to used SEM to understand the relationships and interaction of my data.

 

I used this model (below) but gets this error that I am unable to go around. Can you please assist. I have an extract of my large dataset for your use.

 

model <- '

                # Latent variables (measurement models)

                  Soil  =~ Clay + Depth + BD + Silt

                  Env   =~ TWI + LS

                  Clim  =~ API + ETo

 

                # Regressions

                  Soil ~ Env

                  Env ~ Clim

                  Grav ~ Soil + Env + Clim

                 

                # Residual correlation (Covariance)

                  Clay ~~ Depth

 

                # Intercept of observed varibales

                  Grav ~ 1

                  Clay ~ 1

                  Depth ~ 1

                  Silt ~ 1

                  BD ~ 1

   fit1 <- sem(model, data = SEM.df)

   fit2 <- sem(model, data = SEM.df, group = "SoilSeries")

 

 

error “  In lavaan::lavaan(model = model, data = SEM.df, model.type = "sem",  :

  lavaan WARNING: the optimizer warns that a solution has NOT been found! ”


Many thanks

Kwabena

df.rds

Terrence Jorgensen

unread,
Sep 28, 2018, 6:04:07 AM9/28/18
to lavaan

error “  In lavaan::lavaan(model = model, data = SEM.df, model.type = "sem",  :

  lavaan WARNING: the optimizer warns that a solution has NOT been found! ”


Are you using the latest lavaan (version 0.6-3)?  I do not get an error message, but I get the warning message above, as well as a second warning:

lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigate

Following the instructions in the message, I see huge discrepancies in the scales of your variables, which makes it difficult for the optimizer to search for a solution.  You can rescale your variables to express them in a different order of magnitude, for example:

## interpret effect of changing ETo by one-tenth of a unit
SEM
.df$ETo_10 <- SEM.df$ETo * 10
## interpret effect of changing Silt by 100 units
SEM
.df$Silt_100 <- SEM.df$Silt / 100


Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam


Kwabena A. Nketia

unread,
Sep 30, 2018, 5:48:12 AM9/30/18
to lav...@googlegroups.com
Many thanks Terrence

--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.


--
Nketia, Kwabena Abrefa (M.Phil)
PhD Candidate, Physical Geography - Georg August University, Germany

Ghana
Research Scientist
Soil Genesis, Survey & Classification Div.
CSIR-Soil Research Institute, PMB. Kwadaso - Kumasi - Ghana
Reply all
Reply to author
Forward
0 new messages