Help with the procedure by Devlieger & Rosseel, 2017

121 views
Skip to first unread message

Nikola Ćirović

unread,
Aug 18, 2020, 5:36:53 PM8/18/20
to lavaan

Dear lavaan community,

I have a question regarding the implementation of the method from the paper by Devlieger & Rosseel, 2017 on FSR. Recently, Dr Rosseel suggested in a post (on multilevel FSR) that one should use the lavaan ::: sam function which I have applied to my model. My model is a latent mediation model with 5 personality dimensions (correlated factors, as focal predictors) and two bifactor structures (however, I only use the general factors of the two bifactors for my model – one as a mediator and the other is an outcome variable). In order to specify this whole model, I have first used the orthogonal=T argument in order to make all the specific-group factors (total 8 of them) orthogonal to one another and to other factors in the model while using manually specifying which latent variables should have correlation or latent paths between them. Alternatively, I specified all the relationships between latent variables in the syntax (fixing all the group factors correlations with other latent variables to zero). However, regardless of the method, I use I get a warning message saying that the are no free parameters in the structural part of the model (the sem function works fine). Also, if I model the two bifactors as simple unidimensional latent variables (without group-specific factors) the problem seems to go away, therefore, I (with my highly limited understanding of this) can only blame it on something I did while specifying the two bifactors.

The specification I use fit.proba <- lavaan ::: sam (proba, data = data, estimator = "MLR", missing = 'fiml',sam.method = "local" )

The message I get:

Warning message:

In lavaan:::sam(proba, data = XXXXXXX_X_ukupna_matrica_07_12bez10misingout_01,  :

  lavaan WARNING: no free parameters left for structural part.

        Returning measurement part only.

> summary(fit.proba, fit.measures= T, standardize = T, rsquare = T)

      Length Class  Mode

 [1,] 1      lavaan S4 

 [2,] 1      lavaan S4 

 [3,] 1      lavaan S4 

 [4,] 1      lavaan S4 

 [5,] 1      lavaan S4 

 [6,] 1      lavaan S4 

 [7,] 1      lavaan S4 

 [8,] 1      lavaan S4 

 [9,] 1      lavaan S4 

[10,] 1      lavaan S4 

[11,] 1      lavaan S4 

[12,] 1      lavaan S4 

[13,] 1      lavaan S4 

[14,] 1      lavaan S4 

 

fsr function still shows the same warning regardless of the way I specify a model.

Error in FSM[[g]] %*% THETA[[g]] :

  requires numeric/complex matrix/vector arguments

 

Moreover, I see from this post https://github.com/yrosseel/lavaan/blob/master/R/xxx_sam.R something about the local sam not being suited for bifactors while global sam’s restrictions are not mentioned - it doesn’t work with my model either (and as far as I understand that argument does not correspond to the method described by Devlieger & Rosseel, 2017 (http://dx.doi.org/10.1027/1614-2241/a000130) .


Sorry for the lengthy description. I am thankful for any kind of advice on how to use (if at all possible) factor regression score approach on my original model.


Best wishes, Nikola 

Yves Rosseel

unread,
Aug 26, 2020, 6:17:15 AM8/26/20
to lav...@googlegroups.com
Dear Nikola,

Can you provide me the full R script (and perhaps a snippet of the
data)? I would like to investigate this further. Please send it to Yves
dot Rosseel at UGent dot be

It sounds to me like lavaan:::sam() is not able to distinguish between
the 'measurement part' and the 'structural part' of the model, but I
would need to 'see' the full syntax to be sure.

Further:

On 8/18/20 11:36 PM, Nikola Ćirović wrote:
> fsr function still shows the same warning regardless of the way I
> specify a model.

This should be fixed in 0.6-7. But the workaround may still work: adding
missing = "listwise"

> Error in FSM[[g]] %*% THETA[[g]] :
>
>   requires numeric/complex matrix/vector arguments


> Moreover, I see from this post
> https://github.com/yrosseel/lavaan/blob/master/R/xxx_sam.R something
> about the local sam not being suited for bifactors

'local SAM' (using ML for the 'M' matrix) and 'FSR + Croon' are the
same. 'global' SAM is more general.

The 'problem with local-SAM and FSR/Croon is that they require the
'Lambda' matrix of factor loadings to be of full rank. This is not
guaranteed with bi-factor models. Consider the following pattern:

1 1 0
1 1 0
1 1 0
1 0 1
1 0 1
1 0 1

where the first column is the 'general' factor, and the last two columns
are the 'specific' factors; if all loadings are 1, the first column is
the sum of the other two, and hence the 'rank' of the matrix is only 2.

Yves.

Nikola Ćirović

unread,
Aug 28, 2020, 5:05:31 AM8/28/20
to lavaan
Dear Yves,

Thank you so much for this reply. I have sent you the script and the full data to the email you have told me to use and I am very eager to find out what could be the problem.

The problem with lavaan ::: fsr function was resolved when I reinstalled lavaan (to the 6-7 version); the listwise would not do much because the ability of sam to use the full data (at least it reports to have used it) is really of great utility in my research.
   
One problem I would like to reiterate (perhaps others may find it interesting as well) is that I get completely different results with fsr function and local sam - I dropped the bifactors and modelled these as the traditional (strict) unidimensional latent variables. 

FSR yielded results that are really strange  - structural parameters are so contrary to the once I obtained with sam function with the sam.method=”local” argument and contrary to once I got when I use MLR or WLSMV with sem function, and also these parameters don’t make sense (when I prespecify sem-derived paths with fsr function the fit, of course,  is poor). 

 Given that at this point I cannot tell what is going on with the fsr results and that sam results in something congruent to SEM analysis (across different estimators), I really need to ask you if I can use sam function with sam.method=”local” argument and cite the Devlieger & Rosseel, 2017?

Here is the fsr code I used: 


modeSAM.bez.bifactora<-'   

trait1=~ p114+p125+p129+p130+p133+p136+p138

trait2=~p116+p118+p127+p131+p137+p140

trait3=~p115+p121+p123+p124+p132+p139

trait4=~p117+p119+p126+p128+p134

trait5=~p113+p120+p122+p135+p141

mediator =~ p142+p143+p144+p145+p146+p147+p148+p149+p150+p151+p152+p153+p154+p155+p156+p157+p158+p159+p160+p161+p162+p163+p164+p165+p166    

outcome =~ p167+p168+p169+p170+p171+p172+p173+p174+p175+p176+p177+p178+p179+p180+p181+p183+p184+p185+p186

mediator~ trait1+trait2+trait3+trait4+trait5

outcome~ mediator+trait1+trait2+trait3+trait4+trait5

'

fit.fsr.model  <-  lavaan:::fsr(model = model, data =data, cmd = "sem", 

    fsr.method = "Croon", fs.method = "Bartlett")

summary(fit.fsr.model,

        fit.measures = TRUE,standardize = TRUE,

        rsquare = TRUE)


Of course, if I could use the bifactors with any of these methods that would be the best for my current (and future research). Fsr won't work with the bifactors either because the corrected covariance matrix f the factor scores is not a positive definite. 

Ona additional question, I have noticed that when I use sam function after ML standard errors of the structural parameters (and p values) differ really slightly from SEs and p that I get from MLR.  Did I do something wrong here or is it that sam is able to use the robust SE from MLR (this did not seem at first since it only has one column of output and it is ML)

I am sorry if I am being too assertive. 

Kind regards and many thanks for your help, 

Nikola


Yves Rosseel

unread,
Aug 29, 2020, 2:22:18 PM8/29/20
to lav...@googlegroups.com
Dear Nikola,

Thanks for your script/data. In principle, it should work. But it is
important that when we estimate the CFA models in the first step, we
keep the bifactor pieces together. This means that we must fit the
general factor and its specific factors in one go (and not first the
general factor alone, and then the first specific factor alone, etc). To
accomplish this, you need to use the mm.list= argument as follows:

mm.list = list(bis = "bis", bas = "bas", fight = "fight", freeze =
"freeze", flight = "flight", socanx = c("SOCANX", "SA1", "SA3", "SA4"),
rum = c("RUM" ,"RT", "CFT", "PFT"))

The mm.list defines the 'blocks' that are fitted together. For the
bis/bas/... factors, it is one factor per block. But for socanx and rum,
we fit several factor together:

# sam - local
fit.sam <- lavaan:::sam(proba, data = rsq_rtsq_sas1, sam.method =
"local", estimator = "MLR", missing = "fiml", verbose = TRUE,
mm.list = mm.list)

Unfortunately, this will not work for your data. The reason is that the
measurement models fit (very) poorly, leading to more 'error' than
'signal' for some of the variables, and this gives computational trouble
later when computing the (two-step) standard errors. At least, when
sam.method = "local".

The only way out (here) is to switch to sam.method = "global":

fit.sam.global <- lavaan:::sam(proba, data = rsq_rtsq_sas1,
sam.method = "global",
estimator = "MLR", missing = "fiml",
mm.list = mm.list)

which does work for your model/data combination. The difference between
local/global is somewhat technical. Local sam will explicitly compute an
estimate of the variance/covariance matrix of the latent variables, and
compute the regressions among them in a second step. Global sam does not
explicitly compute this variance matrix, and this can an advantage in
more demanding settings.

Yves.
> --
> 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
> <mailto:lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lavaan/9e969566-a9e9-4b10-88cb-525755a9ac19n%40googlegroups.com
> <https://groups.google.com/d/msgid/lavaan/9e969566-a9e9-4b10-88cb-525755a9ac19n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages