single indicator latent variables and fixed factor scale setting

934 views
Skip to first unread message

Diana Meter

unread,
Mar 1, 2016, 12:43:58 AM3/1/16
to lavaan
Hello,
I have a question about including single indicators of latent variables and also using std.lv=TRUE for fixed factor scale setting. The way the syntax below is written, is the model specified correctly? The default is for the residuals for the single indicator latent variables to be fixed to 0, and for the latent variance to be fixed to 1, correct? When a mean structure is requested, I am a little confused by the the presentation of the observed value and the latent value (0) in the results. 

I was under the impression that the defaults in place for cfa and sem in lavaan, while specifying std.lv=T, while designating the single observed variables as single indicators of a latent construct would result in correct estimates in an identified model. I have seen some other ways of specifying models with single indicator latent constructs in lavaan, and so would just appreciate knowing that the way the model is specified is correct.
Thank you very much in advance for your response!
Diana

outcomesnomod<-'
assert=~w1ed_oa_as1 +   w1ed_oa_as3 + w1ed_oa_as4 +   w1ed_oa_as6 + w1ed_ra_as1 +   w1ed_ra_as3 + w1ed_ra_as4 +   w1ed_ra_as6
aggressO=~w1ed_oa_oag1 +  w1ed_oa_oag3 + w1ed_ra_oag1 + w1ed_ra_oag3 
AggressR=~   w1ed_oa_rag2 +   w1ed_oa_rag4 +   w1ed_ra_rag2 +  w1ed_ra_rag4
neuAdult=~w1ed_oa_neu1 + w1ed_oa_neu3 + w1ed_ra_neu1 + w1ed_ra_neu3
neuComf=~ w1ed_oa_neu2 + w1ed_oa_neu4 + w1ed_ra_neu2 + w1ed_ra_neu4

OV =~ w1ov1 + w1ov2 + w1ov3 
RV =~ w1rv1 + w1rv2 + w1rv3
OA=~oa_ave
RA=~ra_ave
accept =~ w1like
reject =~ w1dislike
pop=~ w1pop
unpop=~ w1notpop
depress =~ cesdmean
age1=~ age

OA~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender + age1
RA~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender + age1
OV~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender+ age1
RV~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender + age1
accept~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender + age1
reject~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender+ age1
pop~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender+ age1
unpop~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender+ age1
depress~ assert + aggressO + AggressR + neuAdult + neuComf + w1gender+ age1
'

#robust
fitoutcomesnomod<- sem(outcomesnomod, data=data, missing='fiml', std.lv=TRUE, meanstructure=T,  estimator="MLR",control=list(iter.max=100000000))
summary(fitoutcomesnomod, fit.measures = TRUE, standardized=TRUE, modindices = FALSE )


Terrence Jorgensen

unread,
Mar 1, 2016, 3:38:28 AM3/1/16
to lavaan
I have a question about including single indicators of latent variables and also using std.lv=TRUE for fixed factor scale setting. The way the syntax below is written, is the model specified correctly? The default is for the residuals for the single indicator latent variables to be fixed to 0, and for the latent variance to be fixed to 1, correct?

Yes, that is the default, and I don't see anything wrong with your syntax.

When a mean structure is requested, I am a little confused by the the presentation of the observed value and the latent value (0) in the results. 

I don't see any output in your post, but by default, the mean structure will be identified by setting the latent means to zero, whether std.lv = TRUE or FALSE (same defaults as Mplus).  So you should have an estimated intercept for each indicator and all latent means == 0 (just-identified mean structure).

Terry

yrosseel

unread,
Mar 1, 2016, 4:39:45 AM3/1/16
to lav...@googlegroups.com
On 03/01/2016 06:43 AM, Diana Meter wrote:
> I was under the impression that the defaults in place for cfa and sem in
> lavaan, while specifying std.lv=T, while designating the single observed
> variables as single indicators of a latent construct would result in
> correct estimates in an identified model.

To get a better understanding of lavaan's defaults, please see the
lavaan paper:

https://www.jstatsoft.org/article/view/v048i02

in particular section 4.1, and table 3.

Yves.

Diana Meter

unread,
Mar 1, 2016, 9:19:13 AM3/1/16
to lavaan
Thank you both very much for your responses!
Diana

Diana Meter

unread,
Nov 30, 2016, 10:38:30 AM11/30/16
to lavaan, Alysha Ramirez Hall
Hello,
I have a follow-up question about single-indicator constructs. If I have a SEM that includes both latent and observed variables, is it more appropriate to include the observed variables without treating them as single indicator constructs? For instance, if I regress my latent construct on age, do I just regress it on that observed variable, or should I create a single indicator construct out of age? 

Are both acceptable ways of modeling?

Does it matter whether or not you request a mean structure in either of these versions of a model? 

I wonder whether the standard error is affected in the single indicator construct version because it is being standardized upon entry into the model, rather than letting it have its naturally occurring intercept and variance. I've done a couple of tests, and the standard errors and p-values do seem to be affected between trials. 

I would appreciate some more information about the most appropriate way to model with a mix of observed and latent variables. Thank you very much in advance!

Best regards,
Diana

alysh...@gmail.com

unread,
Nov 30, 2016, 11:31:13 AM11/30/16
to lavaan, alysh...@gmail.com
As a follow up to this, I am wondering how to handle path models in lavaan. I have a model of all observed variables and have run the model with just paths, such as below:

Model4 <- ('T2Victim ~ T1Victim + T1Depress 
           T3Victim ~ T2Depress + T2Victim
           w2rel2 ~ T1Depress + w1rel2
           w3rel2 ~ T2Depress + w2rel2
           T2Depress ~ T1Victim + w1rel2 + T1Depress + T1VicImp
           T3Depress ~ T2Victim + T2Depress + w2rel2 + T2VicImp
           
           T1Victim ~~ w1rel2 + T1VicImp
            T2Victim ~~ w2rel2 + T2VicImp
            T3Victim ~~ w3rel2')

Fit4 <- sem(Model4, data=Data2,  estimator="MLR", missing='fiml',fixed.x = FALSE)

I have also run a model creating singe indicator latent variables:

Model3.2 <- ("t1race =~ T1RaceVic
           t2race =~ T2RaceVic
             t3race =~ T3RaceVic
             t1rout =~ w1rel2
             t2rout =~ w2rel2
             t3rout =~ w3rel2
             t1depress =~ T1Depress
             t2depress =~ T2Depress
             t3depress =~ T3Depress
             t1racerout =~ T1VicImp
             t2racerout =~ T2VicImp
             t2race ~ t1race + t1depress 
             t3race ~ t2depress + t2race
             t2rout ~ t1depress + t1rout
             t3rout ~ t2depress + t2rout
             t2depress ~ t1race + t1rout + t1depress + t1racerout
             t3depress ~ t2race + t2rout + t2depress + t2racerout")


The models yield very similar beta weights but the p-values vary. There are more significant paths in the model with latent variables. I am wondering 1) why this might be and 2) which is the correct way to run the path analysis in lavaan. 

Thank you.

Terrence Jorgensen

unread,
Dec 1, 2016, 5:13:49 AM12/1/16
to lavaan, alysh...@gmail.com
Are both acceptable ways of modeling?

Yes, they will both yields the same regression slopes.  I think what lavaan does behind the scenes is create a single-indicator construct for you, but it keeps all the variance of the observed indicator in the theta matrix instead of setting the indicator's residual variance to zero and putting all the variance in psi.  I think the choice between the two only has a noticeable effect on the standardized solution, but that also might be a matter of setting fixed.x = TRUE or FALSE.  If you want to interpret a "standardized" effect of age on an outcome, then I think you have to make the single-indicator construct in your model syntax.

Does it matter whether or not you request a mean structure in either of these versions of a model? 

Only if you will interpret the mean structure or test any hypotheses about it by adding constraints on intercepts.  

I wonder whether the standard error is affected in the single indicator construct version because it is being standardized upon entry into the model, rather than letting it have its naturally occurring intercept and variance. I've done a couple of tests, and the standard errors and p-values do seem to be affected between trials. 

You should always fit the model to unstandardized variables to make sure your SEs (and therefore Wald z tests) are valid.  The standardized solution is there to show you what the estimates would be if everything were standardized, so you don't need to do any standardizing.  If you make your own single-indicator construct, you would be able to freely estimate the factor loading and set the factor variance to 1, so the factor loading would represent the SD and you could interpret the effect of "standardized age" on the outcome, although that doesn't necessarily mean anything because the SD of age in your sample doesn't necessarily generalize to other samples.

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

Terrence Jorgensen

unread,
Dec 1, 2016, 5:30:39 AM12/1/16
to lavaan, alysh...@gmail.com
The models yield very similar beta weights but the p-values vary. There are more significant paths in the model with latent variables. I am wondering 1) why this might be and 2) which is the correct way to run the path analysis in lavaan. 

Since you are setting fixed.x = FALSE in the path model, the results should be identical (if you set factor loadings to 1 in Model3.2 and freely estimate the factor variances).  They are both correct because lavaan defines the single-indicator construct behind the scenes if you don't. Notice lambda is an identity matrix in your path model results, and the variances in theta are fixed to zero (my previous post was incorrect):

lavInspect(fit, "coef")

Perhaps your results differ because you aren't using all the same variables?  For instance, it looks like you are using T1RaceVic instead of T1Victim.  Also, you specify residual correlations between endogenous variables at Times 2 and 3 in Model 4 but not in Model 3.2 -- if those are fixed to zero, it will affect other model parameters.

Diana Meter

unread,
Dec 1, 2016, 9:32:25 AM12/1/16
to lavaan, alysh...@gmail.com
Thank you very much!
Diana
Reply all
Reply to author
Forward
0 new messages