difference between mplus and lavaan thresholds

567 views
Skip to first unread message

merm.m...@gmail.com

unread,
May 4, 2013, 1:49:28 PM5/4/13
to lav...@googlegroups.com
Both Mplus and Lavaan produce the same estimated sample threshold statistics.  However, when conducting an sem model, why is it that Mplus uses different thresholds than Lavaan in the actual model?  Mplus uses different threshold estimates than Lavaan does in the actual model when estimating factor loadings or variances.

Thanks.

yrosseel

unread,
May 5, 2013, 9:07:51 AM5/5/13
to lav...@googlegroups.com
I'm not sure what you mean. Can you provide an example?

Yves.

merm.m...@gmail.com

unread,
May 5, 2013, 1:40:32 PM5/5/13
to lav...@googlegroups.com
Mplus starting threshold estimates = lavaan's final thresholds estimates.

Mplus starting thresholds:
STARTING VALUES


           TAU
              I1$1          I1$2          I1$3          I2$1          I2$2
              ________      ________      ________      ________      ________
      1        -2.394        -1.001         1.282        -2.394        -1.036


           TAU
              I2$3          I3$1          I3$2          I3$3          I4$1
              ________      ________      ________      ________      ________
      1         0.812        -2.394        -0.648         1.073        -1.111


           TAU
              I4$2          I5$1          I5$2          I6$1          I6$2
              ________      ________      ________      ________      ________
      1         1.192        -1.501         0.477        -2.128        -0.935


           TAU
              I6$3          I7$1          I7$2          I7$3          I8$1
              ________      ________      ________      ________      ________
      1         0.755        -1.960        -1.111         0.872        -2.394


           TAU
              I8$2          I8$3
              ________      ________
      1        -1.569         0.524

Mplus final Thresholds:
    I1$1              -1.505
    I1$2              -0.629
    I1$3               0.805
    I2$1              -1.808
    I2$2              -0.783
    I2$3               0.613
    I3$1              -4.426
    I3$2              -1.199
    I3$3               1.984
    I4$1              -0.624
    I4$2               0.669
    I5$1              -1.881
    I5$2               0.598
    I6$1              -2.987
    I6$2              -1.312
    I6$3               1.061
    I7$1              -2.311
    I7$2              -1.310
    I7$3               1.028
    I8$1              -2.906
    I8$2              -1.904
    I8$3               0.637

Lavaan final threshold estimates:
t1i1|t1 -2.394
t1i1|t2 -1.001
t1i1|t3 1.282
t1i2|t1 -2.394
t1i2|t2 -1.036
t1i2|t3 0.812
t1i3|t1 -2.394
t1i3|t2 -0.648
t1i3|t3 1.073
t1i4|t1 -1.111
t1i4|t2 1.192
t2i1|t1 -1.501
t2i1|t2 0.477
t2i2|t1 -2.128
t2i2|t2 -0.935
t2i2|t3 0.755
t2i3|t1 -1.960
t2i3|t2 -1.111
t2i3|t3 0.872
t2i4|t1 -2.394
t2i4|t2 -1.569
t2i4|t3 0.524

I guess I realized part of the problem is that the diagonals on the $theta matrix are being estimated in Mplus, but not in Lavaan.  How do I get lavaan to estimate $theta parameters.  I hope that helps and is not confusing.  Otherwise I can post a model if that makes it easier.

Thanks.

yrosseel

unread,
May 5, 2013, 2:05:43 PM5/5/13
to lav...@googlegroups.com
On 05/05/2013 07:40 PM, merm.m...@gmail.com wrote:

> I guess I realized part of the problem is that the diagonals on the
> $theta matrix are being estimated in Mplus, but not in Lavaan. How do I
> get lavaan to estimate $theta parameters.

This explains it. lavaan (0.5-12) does not yet support the so-called
'theta' parameterization (where the theta diagonal elements are free
parameters). lavaan only supports the delta parameterization.

But in most cases, the two parameterizations are equivalent (same model
fit).

Yves.

merm.m...@gmail.com

unread,
May 6, 2013, 12:52:32 AM5/6/13
to lav...@googlegroups.com
Thanks Yves.  But if the theta paramaters are not being estimated would that explain for why Mplus final threshold values are not the same as lavaans?  Although the models are same, the different parametrization will result in different threshold values and thus parameter estimated (such as factor loadings and variances) between Mplus and lavaan for categorical sem models, yes?

All your help is greatly appreciated.
Tav.

yrosseel

unread,
May 7, 2013, 3:29:38 AM5/7/13
to lav...@googlegroups.com
On 05/06/2013 06:52 AM, merm.m...@gmail.com wrote:
> Thanks Yves. But if the theta paramaters are not being estimated would
> that explain for why Mplus final threshold values are not the same as
> lavaans?

Absolutely. In the theta parameterization, theta is fixed to 1.0, and
this affects the values of other parameters.

See the Mplus webnote about this:

www.statmodel.com/download/webnotes/CatMGLong.pdf

Yves.

Michael Paul Grosz

unread,
Oct 27, 2014, 11:19:19 AM10/27/14
to lav...@googlegroups.com
Hi Yves,

I am not completely sure whether I understand the difference between delta and theta parametrization outlined in the Mplus webnote.
The theta parametrization allows one to test for invariance across groups with regard to the residual variances. However, if one wants to test the invariance of thresholds and loadings across groups, both, delta and theta parametrization, are useable.
right?

best,
Michael

Yves Rosseel

unread,
Nov 20, 2014, 2:42:44 AM11/20/14
to lav...@googlegroups.com
On 10/27/2014 04:19 PM, Michael Paul Grosz wrote:
> Hi Yves,
>
> I am not completely sure whether I understand the difference between
> delta and theta parametrization outlined in the Mplus webnote.
> The theta parametrization allows one to test for invariance across
> groups with regard to the residual variances. However, if one wants to
> test the invariance of thresholds and loadings across groups, both,
> delta and theta parametrization, are useable.
> right?

Right.

Yves.

Phil Wood

unread,
Nov 14, 2020, 11:26:38 AM11/14/20
to lavaan
Not to revitalize an old thread, but is there a difference in how the two programs handle missing data? For example, ifi I write in Mplus and lavaan, I get the same thresholds if I make a data set with no missing data, but different thresholds if I have missing data.
TITLE:  
DATA:
  FILE IS "mydata.txt";
listwise=on;
ANALYSIS:
  TYPE IS MISSING;
  ESTIMATOR IS wlsmv;
  parameterization=delta;
(follows a tau equivalent factor model)
I get different answers from lavaan with call:
model<-"
! regressions 
   f=~L1*qpls5mw0
   f=~L1*qpls5mw1
   f=~L1*qpls5mw2
   f=~L1*qpls5mw3
   f=~L1*qpls5mw4
   f=~L1*qpls5mw5
   f=~L1*qpls5mw6
   f=~L1*qpls5mw7
   f=~L1*qpls5mw8
   f ~~ 1*f
qpls5mw0 | th0*t1
qpls5mw1 | th1*t1
qpls5mw2 | th2*t1
qpls5mw3 | th3*t1
qpls5mw4 | th4*t1
qpls5mw5 | th5*t1
qpls5mw6 | th6*t1
qpls5mw7 | th7*t1
qpls5mw8 | th8*t1
";
result<-lavaan(model, data=pls5data,parameterization="delta", 
               missing = "listwise",
               ordered=c("qpls5mw0",
                 "qpls5mw1",
                 "qpls5mw2",
                 "qpls5mw3",
                 "qpls5mw4",
                 "qpls5mw5",
                 "qpls5mw6",
                 "qpls5mw7",
                 "qpls5mw8"),estimator="WLSMV");

any thoughts? TIA Phil

Terrence Jorgensen

unread,
Nov 14, 2020, 4:52:12 PM11/14/20
to lavaan
I think Mplus uses pairwise deletion by default when fitting actual models (e.g., TYPE = GENERAL), which you can do in lavaan by setting missing = "pairwise".  However, in Mplus you set:

listwise=on;
ANALYSIS:
  TYPE IS MISSING;

Does TYPE IS MISSING return summary statistics and proportions of missing data per variable?  I don't see that TYPE option listed in their manual:


Perhaps it only deleted missing cases per variable, rather than cases that have missing values on any variable in USEVARIABLES (which you did not specify).  Difficult to tell without attaching the Mplus output file.

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


Message has been deleted

Patrick (Malone Quantitative)

unread,
Nov 14, 2020, 6:12:46 PM11/14/20
to lav...@googlegroups.com
In Mplus, TYPE IS MISSING is obsolete, having become the default a
number of years ago, instead of the old default of listwise. LISTWISE
IS ON was added as an option instead. I'm not sure what happens with
both of them specified, as they are intended to do opposite things, so
I'm not sure what you are expecting from that.

On Sat, Nov 14, 2020 at 6:01 PM Phil Wood <philli...@gmail.com> wrote:
>
> I already tried that and, for good measure, have that option turned on in lavaan. They are still different, but thanks, I should have made that clearer:
> For documentation purposes, here's the essential code of each:
> DATA:
> FILE IS mydata.txt";
> listwise=on;
> VARIABLE:
> NAMES ARE all-the-names;
> USEVARIABLES ARE just-the-items;
> MISSING IS .;
> categorical is
> just-the-items;
> ANALYSIS:
> TYPE IS MISSING;
> ESTIMATOR IS wlsmv;
> parameterization=delta;
> (tau-equivalent model follows)
> and for lavaan:
> model<-"
> "qpls5mw8"),estimator="WLSMV",optim.method="BFGS",optim.dx.tol = .0001);
> summary(result, fit.measures=TRUE,rsquare=TRUE, standardized=TRUE);
> Thanks, folks, hope this clears the question up a bit.
> --
> 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/dd2b9ec6-71d9-4819-bd7c-ae28c362c79bn%40googlegroups.com.



--
Patrick S. Malone, Ph.D., Malone Quantitative
NEW Service Models: http://malonequantitative.com

He/Him/His
Reply all
Reply to author
Forward
Message has been deleted
0 new messages