Collinearity in SEM with nested data (using lavaan.survey)

925 views
Skip to first unread message

Masha van der Sande

unread,
Sep 21, 2015, 1:59:36 PM9/21/15
to lavaan

Dear all,


I am trying to run a SEM with nested data, for which I use the lavaan.survey function. Including this nested structure is quite straightforward:


# Running the normal SEM

fit1 <- sem(model1, fixed.x=T, data=data)

# Creating a design factor for the nested structure

design <- svydesign(ids= ~ Random.factor, nest=TRUE, data=data)

# Combining SEM and the design factor

fit.total1 <- lavaan.survey(lavaan.fit=fit1, survey.design=design)  

However, I receive a warning in the lavaan.survey function, no matter what I change in the model:

Warning message:

1: In lavaan.survey(lavaan.fit = fit.surv12, survey.design = design,  :

  Some of the standard errors may not be trustworthy.  Some of the observed covariances or means are collinear, and this has generated collinearity in your parameter estimates.  This may be a sample size issue, missing data problem, or due to having too few clusters relative to the number of parameters. Problem encountered in group(s) 1

 

I have tested for the variance inflation factor among my variables, but it is absolutely not present. I expect that missing data and the sample size are no issue. Hence, the problem should be in "having too few clusters relative to the number of parameters". I have 18 groups in my random factor, ranging between 1 and 32 observations per group:

Group.nr

Nr of replicates

1

16

2

16

3

32

4

16

5

15

6

8

7

1

8

1

9

1

10

1

11

1

12

1

13

1

14

1

15

6

16

5

17

15

18

10


Would anyone if there is a problem, what could be the problem, and how I could solve it?

Any help is welcome! Thanks a lot in advance!

yrosseel

unread,
Sep 23, 2015, 3:39:28 AM9/23/15
to lav...@googlegroups.com
On 09/21/2015 07:59 PM, Masha van der Sande wrote:
> clusters relative to the number of parameters". I have 18 groups in my
> random factor, ranging between 1 and 32 observations per group:

I am not familiar with the technical details of the lavaan.survey
package, but it might be that these methods can not handle the setting
where some 'clusters' only have 1 observation. Does it work if you
remove those 'clusters' (group.nr 7--14)?

Yves.

Terrence Jorgensen

unread,
Sep 24, 2015, 4:42:03 AM9/24/15
to lavaan

I have 18 groups in my random factor, ranging between 1 and 32 observations per group:


I only recently started looking at examples using the lavaan.survey package.  Here is a link to a script co-written by the developer, as support for analyzing European Social Survey data in R (see more details here).

Pay special attention to lines 69-74 of the script:

# By default, R will crash if a primary sampling unit (psu) has a single observation.
# Set R to produce conservative standard errors instead of crashing by running this line:
options( survey.lonely.psu = "adjust" )
# this setting matches the MISSUNIT option in SUDAAN


Hope this helps,

Terry

mett...@gmail.com

unread,
May 2, 2017, 9:39:46 AM5/2/17
to lavaan
Hi folks,

I also get this error message and I have come to the conclusion that I have too few clusters relative to the number of parameters. I have 6 clusters (regions), each with 16 observations (sites). So I have 96 sites in total, and the sites were sampled in two consecutive years. Is there a rule of thumb for the number of clusters one should have relative to the number of parameters, and how concerned should one be about borderline cases.

Thanks
Mark
Reply all
Reply to author
Forward
0 new messages