tidyLPA

87 views
Skip to first unread message

Jamie Tock

unread,
Feb 22, 2021, 4:34:24 PM2/22/21
to MplusAutomation
Does anyone know how to implement sampling weights with the tidyLPA package via the MplusAutomation interface in R?  Is there an additional argument that would allow the use of jackknife for example? 

Joshua Wiley

unread,
Feb 22, 2021, 5:36:04 PM2/22/21
to Jamie Tock, MplusAutomation
Hi Jamie,

I don't know tidyLPA, but MplusAutomation has arguments to pass any part of Mplus code to Mplus, so it would be fairly straight forward from that perspective, Just need tidyLPA to support it or "catch" the model before Mplus is run on it and inject the extra code necessary.

Best wishes,

Josh


On Tue, Feb 23, 2021 at 8:34 AM Jamie Tock <jlto...@gmail.com> wrote:
Does anyone know how to implement sampling weights with the tidyLPA package via the MplusAutomation interface in R?  Is there an additional argument that would allow the use of jackknife for example? 

--
You received this message because you are subscribed to the Google Groups "MplusAutomation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mplusautomati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mplusautomation/4d1742de-4393-4b27-84c7-70460db26201n%40googlegroups.com.

Jamie Tock

unread,
Feb 24, 2021, 12:18:49 PM2/24/21
to MplusAutomation
Yeah thanks for the response.  That is what I am trying to do.  I just hoped there would be some examples of someone running a LPA in tidyLPA and then adding additional syntax as an mplusObject without having to pass all of the arguments through mplusmodler.  The benefit of tidyLPA is that it iterates over 6 different types of models and different numbers of potential classes without having to specify the mplus specific syntax.  I was hoping to be able to maintain the tidyLPA syntax and just add on the mplus specific syntax for the weighting terms.

Jamie Tock

unread,
Feb 24, 2021, 1:24:15 PM2/24/21
to MplusAutomation
Say for instance I have the following syntax: 

  df2 %>% 
      single_imputation(.) %>% 
      estimate_profiles(2,
                        package = "MplusAutomation",
                        variances = "equal",
                        covariances = "equal")

...and I want to add an argument that would add a weighting term.  In mplusmodeler you can add weighting terms through mplusObject such as foo = mplusObject(VARIABLE = "WEIGHT = Weight0").  I would basically want to add this to the tidyLPA syntax to results in something like this...

  df2 %>% 
      single_imputation(.) %>% 
      estimate_profiles(2,
                        package = "MplusAutomation",
                        variances = "equal",
                        covariances = "equal", 
                        mplusModeler(foo))

michael.hallquist

unread,
Feb 25, 2021, 9:24:50 AM2/25/21
to MplusAutomation
This makes sense to me, Jamie. But I think for the weighting to pass through from tidyLPA to MplusAutomation, the developer of tidyLPA (Joshua Rosenberg) would need to implement this on that side. I would encourage you to get in touch with him and suggest this as a new feature. Contact info here: https://cran.r-project.org/web/packages/tidyLPA/index.html

Best,
Michael

Jamie Tock

unread,
Apr 21, 2021, 3:47:09 PM4/21/21
to MplusAutomation
Thanks for your response.  I did attempt to contact Joshua Rosenberg but did not get a response.  I still haven't found a way to enter the weighting term through MplusAutomation so for now I just ran the model in mplus and then extracted the results with the readModels function.  However if you have heard of anything since that time, I would be happy to hear about it. 
Reply all
Reply to author
Forward
0 new messages