Bootstrap still unavailable in DWLS estimator (or ULS estimator) with lavaan 0.5-17.697?

1,457 views
Skip to first unread message

Seongho Bae

unread,
Jul 10, 2014, 3:16:24 PM7/10/14
to lav...@googlegroups.com
Dear all.

I'm using WLSMV Estimator in my model. All Measurement was Likert Scale; So, I decided use WLSMV estimator. Because, Likert Scale is ordinal scale.

Anyway, My anonymous reviewer says, "You have to bootstrapping for to know direct effect and indirect effect in your model. Please estimate, and report that".

But, In my knowledge, WLSMV estimator cannot use any bootstrapping method. I can find "Error in lav_options_set(opt) : use (D)WLS estimator for bootstrap" message. So, I tried bootstrapping with DWLS estimator, but It doesn't return any result. This job was started three days ago, and still working now.

Bootstrap still unavailable in DWLS estimator or ULS estimator with lavaan 0.5-17.697?

I'm using Ubuntu Linux 14.04 64bit, Intel Core 2 Duo E6750 Processor (2.66GHz), 4GB RAM (1G x 4 RAMS, Dual Channel).

Best wishes,
Seongho Bae.

yrosseel

unread,
Jul 11, 2014, 11:46:30 AM7/11/14
to lav...@googlegroups.com
On 07/10/2014 09:16 PM, Seongho Bae wrote:
> Bootstrap still unavailable in DWLS estimator or ULS estimator with
> lavaan 0.5-17.697?

Try it like this (and replace myModel and myData with the correct names):

fit <- cfa(myModel, data=myData, se="bootstrap", test="scaled.shifted",
estimator="DWLS", verbose=TRUE)

Yves.

Seongho Bae

unread,
Jul 12, 2014, 11:54:18 PM7/12/14
to lav...@googlegroups.com
Dear Yves,

Thanks, It works! 

Anyway, I did it on the Xeon processor 16 core machine. But, I observed the lavaan can not use processor resources fully in bootstrapping under OpenBLAS environment. It's just half of usage, I can observe half of resources was at idle. It's not an important issue, but I hope to make improvement this issue someday. :)


Best wishes,
Seongho Bae.


2014년 7월 12일 토요일 오전 12시 46분 30초 UTC+9, Yves Rosseel 님의 말:

2014년 7월 12일 토요일 오전 12시 46분 30초 UTC+9, Yves Rosseel 님의 말:

Yves Rosseel

unread,
Jul 13, 2014, 5:32:48 AM7/13/14
to lav...@googlegroups.com
On 07/13/2014 05:54 AM, Seongho Bae wrote:
> Dear Yves,
>
> Thanks, It works!
>
> Anyway, I did it on the Xeon processor 16 core machine. But, I observed
> the lavaan can not use processor resources fully in bootstrapping

Are you using snow or multicore?

lavaan simply uses the R infrastructure to use multiple cores: see

?parallel::mclapply

If you apply mclapply() outside the context of lavaan, do you see 100%
resource use?

Yves.

Seongho Bae

unread,
Jul 13, 2014, 9:33:11 AM7/13/14
to lav...@googlegroups.com
Are you using snow or multicore

No. my command is like this.

fit <- sem(myModel, data=myData, se="bootstrap", test="scaled.shifted", 
estimator="DWLS", verbose=TRUE) 

I want to know how to transform that to mcapply(). I don't use any snow or mcapply() function; Because I don't know how can I use. But, When I try mirt::mirtCluster(), I can see 16 R processes when try calculate log likelihood.

Seongho Bae.

2014년 7월 13일 일요일 오후 6시 32분 48초 UTC+9, Yves Rosseel 님의 말:

Seongho Bae

unread,
Jul 13, 2014, 10:25:38 AM7/13/14
to lav...@googlegroups.com

I tried use boostrapLavaan() with multicore, I can see 100% resource use.

Seongho Bae.


2014년 7월 13일 일요일 오후 6시 32분 48초 UTC+9, Yves Rosseel 님의 말:
Reply all
Reply to author
Forward
0 new messages