Change iterations

240 views
Skip to first unread message

Anna

unread,
Nov 28, 2021, 11:31:30 AM11/28/21
to lavaan
An SEM I'm running says it ends normally after 423 iterations. Is there a way I can set the number of iterations in R? I'm comparing my results to MPlus, in which I used 15000 iterations. The only thing I could find about setting iterations in R is to set the maximum number of iterations using control=list(iter.max= . I've tried setting the maximum number of iterations to different numbers, but it always ends after 423. Any help would be appreciated!

Anna

Shu Fai Cheung

unread,
Nov 28, 2021, 1:14:52 PM11/28/21
to lavaan
> I've tried setting the maximum number of iterations to different numbers

As the name of the argument implies, it controls the maximum number of iterations. If convergence was achieved after 423 iterations, then even if you set the maximum number of iterations to any number higher than 423, it will always stop after 423 iterations if the starting values are the same and no stochastic perturbation is involved in the optimization.

> I'm comparing my results to MPlus, in which I used 15000 iterations

I am not familiar with Mplus. Did you mean Mplus achieved convergence after 15000 iterations? Or did you force Mplus to do 15000 iterations? Or did you mean you set the maximum number of iterations to 15000 in Mplus?

-- Shu Fai

Edward Rigdon

unread,
Nov 28, 2021, 1:22:17 PM11/28/21
to lav...@googlegroups.com
Was the Mplus run a Bayesian application, using iterations for burn-in and then for a Monte Carlo estimation?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/8a0ae39e-87f9-4e86-9720-ddacbcc447e9n%40googlegroups.com.

Anna

unread,
Dec 4, 2021, 3:32:58 PM12/4/21
to lavaan
Thanks for your help!

I'm not very familiar with Mplus either. My advisor is the one that ran the analysis with Mplus. It says that the maximum number of iterations was 150000. It did converge, but I'm not sure after how many iterations. 

Pat Malone

unread,
Dec 4, 2021, 5:02:57 PM12/4/21
to lav...@googlegroups.com
Anna,

If you don't see the number of iterations Mplus actually used in the default output, you can specify OUTPUT: TECH8; and see it.

Pat

--
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.


--
Patrick S. Malone, PhD
Sr Research Statistician, FAR HARBΦR
This message may contain confidential information; if you are not the intended recipient please notify the sender and delete the message.
Reply all
Reply to author
Forward
0 new messages