Intercept and slope in LGM as predictors for regression

535 views
Skip to first unread message

Pengxiang Li

unread,
Mar 7, 2017, 10:07:09 PM3/7/17
to lavaan
Hi, all, I have a question.

I want to use the intercept and slope in latent growth model as predictors for regression. 
the notation I used is

my.model3<-'i=~1*math0+1*math1+1*math2+1*math3
s=~0*math0+1*math1+2*math2+3*math3
i+s~x
y~x+i+s'
my.fit3<-growth(my.model3,data=my.df)
summary(my.fit3,fit.measures=TRUE,standardized=TRUE,rsquare=TRUE)

However, somehow, I keep getting a warning, like

“Warning message:
In lav_partable_check(lavpartable, categorical = categorical, warn = TRUE) :
  lavaan WARNING: missing intercepts are set to zero: [y]”

While, if I changed function "growth" in the model fit to "sem", there would be no warning, but, the result of model fit is different.

Hope you guys could help me. thx!






Terrence Jorgensen

unread,
Mar 8, 2017, 4:37:00 AM3/8/17
to lavaan
“Warning message:
In lav_partable_check(lavpartable, categorical = categorical, warn = TRUE) :
  lavaan WARNING: missing intercepts are set to zero: [y]”

You didn't specify any intercepts in your syntax, and the growth() function only knows how to treat indicators of latent growth factors by default (setting indicator intercepts to zero, and freely estimating intercepts of latent factors).  You also have an observed endogenous variable y.  The warning message is telling you that it set the intercept to zero because you didn't specify it to be estimated, which you should do.


While, if I changed function "growth" in the model fit to "sem", there would be no warning, but, the result of model fit is different.

The growth() function is just another wrapper around lavaan() with certain defaults.  As your example shows, those defaults really only make sense in simple growth curves, because it assumes that all manifest variables are indicators of latent growth curves, and that all latent factors are growth factors.  You might be better off specify exactly which parameters you want to fix or free in your model syntax, then just use the lavaan() function.  If you use growth(), you should check the parameter table carefully to make sure you are estimating (and fixing) everything you intend to.

parTable(my.fit3)


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

Pengxiang Li

unread,
Mar 8, 2017, 6:55:25 AM3/8/17
to lavaan
Thanks so much for the suggestion, Terrence.

I am just a beginner of R and SEM, so I have a follow up question. Say, if in the regression model "y<-x+i+s", I am not interested in the intercept of y, how should I specify it?

In terms of the functions, so far I am not quite familiar with "lavaan()", so maybe "growth()" would be easier for me, as I don't have to specify too many parameters.

Thanks ahead.

Pengxiang Li

unread,
Mar 8, 2017, 8:07:58 AM3/8/17
to lavaan
can I specify 'y ~ 1' in the model to specify the intercept?

Thx!


On Wednesday, March 8, 2017 at 5:37:00 PM UTC+8, Terrence Jorgensen wrote:

Terrence Jorgensen

unread,
Mar 9, 2017, 4:03:53 AM3/9/17
to lavaan
can I specify 'y ~ 1' in the model to specify the intercept?


In terms of the functions, so far I am not quite familiar with "lavaan()", so maybe "growth()" would be easier for me, as I don't have to specify too many parameters.

Well, the problem you posted was that you were not specifying enough parameters.  Learning how to correctly specify a model is good practice when learning SEM because it forces you to translate each part of your path diagram into model syntax (and vice versa), which also helps you get in the habit of making accurate path diagrams.  So I think this part of the learning curve is worth the effort.  

Using shortcuts like growth() can also help while learning because you can print out the parameter table to see what the function does automatically (although the problem is that those defaults are not appropriate in all situations).

Pengxiang Li

unread,
Mar 10, 2017, 3:50:51 AM3/10/17
to lavaan
Thank you so much for helping me!
Reply all
Reply to author
Forward
0 new messages