semTools update

468 views
Skip to first unread message

Sunthud Pornprasertmanit

unread,
Aug 4, 2014, 3:05:48 PM8/4/14
to lav...@googlegroups.com
Dear all,

We have updated semTools to version 0.4-5. It is available on our repository. You may access it by typing the following line in your R console:

install.packages("semTools", repos="http://rweb.quant.ku.edu/kran", type="source")

Note that this version of semTools is not available on CRAN because we are using hidden functions in lavaan. When this issue is fixed, we will update it on CRAN.

Here are the details for this update:

The measurementInvarianceCat function is available for automatically implementing measurement invariance for categorical indicators. ThepartialInvariance and partialInvarianceCat functions are also available to easily find partial invariance models. Click here for the detailed explanation of how these functions work. ThesingleParamTest function is added to run a post-hoc analysis after nested model comparison to find the constraint (with 1 df) that makes nested models different. The SSpower function is added to implement the power analysis using Satorra and Bentler's (1985) method. The averaged variance extracted (AVE) is available in the reliability function. The fixed factor method of scale identification is available in the measurementInvariance function by specifying std.lv=TRUE

Please let me know if you have any questions, problems, or comments.

Best,
Sunthud


MikkelGH

unread,
Aug 6, 2014, 10:22:46 AM8/6/14
to lav...@googlegroups.com
A possible bug report: https://groups.google.com/forum/#!topic/lavaan/-kZ_gC1uBAQ

or maybe it is a fix?


Best regards,
Mikkel

Isabella Otto

unread,
Nov 19, 2014, 10:03:41 AM11/19/14
to lav...@googlegroups.com
Dear Sunthud,

thanks for this very useful update.
Unfortunately I get this errror message " Some variables in your model are not identified as categorical".
Can you help me out with this? I have two factors, each 9 items with answer categories from 1 to 6.

Best,
Isabella

Alex Schoemann

unread,
Nov 19, 2014, 10:41:54 AM11/19/14
to lav...@googlegroups.com
Can you post the code that caused this error (the model specification and function?

That will help debug things.

Isabella Otto

unread,
Nov 19, 2014, 10:49:12 AM11/19/14
to lav...@googlegroups.com
Yes:

plpg.mod <- 'pl =~PL1+PL2+PL3+PL4+PL5+PL6+PL7+PL8+PL9
              pg =~PG1+PG2+PG3+PG4+PG5+PG6+PG7+PG8+PG9'

measurementInvarianceCat(plpg.mod, dat, group = "language", parameterization="theta",
                         estimator="wlsmv", ordered = c("PG1", "PL1", "PL2", "PL3", "PG2", "PG3", "PG4", "PG5", "PG6", "PG7", "PG8",
                                                        "PG9", "PL4", "PL5", "PL6", "PL7", "PL8", "PL9"))

Thanks!

Alex Schoemann

unread,
Nov 19, 2014, 11:38:19 AM11/19/14
to lav...@googlegroups.com
Your code looks correct, make sure you have the newest versions of lavaan (0.5-17) and semTools (0.4-6) installed (I noticed some issues with earlier versions of lavaan)

Isabella Otto

unread,
Nov 20, 2014, 5:57:39 AM11/20/14
to lav...@googlegroups.com
I just updated everything but still have the problem...

Diana Zavala Rojas

unread,
Jan 26, 2016, 6:08:49 AM1/26/16
to lavaan
Hello, 

We are working with "miPowerFit" from semTools 0.4-9 and it does not work properly with lavaan 0.5-20. We know that with previous versions of both lavaan and semTools the misspecifications shown for the same model and same data are reported whereas with the new versions the misspecifications do not appear (semTools 0.4-6 and lavaan 0.5-17).

Do you need screenshots  or files to see the problem, so far the data is not publicly available.

Many thanks for your help.

Diana and Andre 

Sunthud Pornprasertmanit

unread,
Jan 26, 2016, 9:44:31 PM1/26/16
to lav...@googlegroups.com
Hi,

I have checked it out and did not see any problems. You may get the latest version (0.4-11) from 




Here is my sessionInfo()

R version 3.2.3 (2015-12-10)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 10240)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MASS_7.3-45       psych_1.5.8       lavaan_0.5-21.930

loaded via a namespace (and not attached):
[1] parallel_3.2.3 mnormt_1.5-3   pbivnorm_0.6.0 stats4_3.2.3   quadprog_1.5-5


--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.

For more options, visit https://groups.google.com/d/optout.

Terrence Jorgensen

unread,
Oct 26, 2016, 5:10:20 AM10/26/16
to lavaan
Dear all,

Version 0.4-14 of semTools assimilates lavaan's most recent internal changes, so it requires at least lavaan version 0.5-22 (and therefore R >= 3.1).  Two new functions, provided by Terrence D. Jorgensen, are available: chisqSmallN() and twostage(), along with lavaan wrappers lavaan.2stage(), cfa.2stage(), sem.2stage(), and growth.2stage().  The first calculates a small-sample correction to the chi-squared test of model fit, as described in:

Nevitt, J., & Hancock, G. R. (2004). Evaluating small sample approaches for model test statistics in structural equation modeling. Multivariate Behavioral Research, 39(3), 439-478. doi:10.1207/S15327906MBR3903_3

The latter functions implement 2-stage ML estimation to handle missing continuous data. You can read the details in:

Savalei, V., & Bentler, P. M. (2009). A two-stage approach to missing data: Theory and application to auxiliary variables. Structural Equation Modeling, 16(3), 477-497. doi:10.1080/10705510903008238

Savalei, V., & Falk, C. F. (2014). Robust two-stage approach outperforms robust full information maximum likelihood with incomplete nonnormal data. Structural Equation Modeling, 21(2), 280-302. doi:10.1080/10705511.2014.882692

A known issue with twostage() is that the Satorra-Bentler scaled test statistic of model fit appears too large.  Although the formulas appear correct in the source code, there may be an undiscovered bug.  For now, only use the residual-based test statistic of model fit, which assumes normally distributed data.  Future versions of semTools might also make alternative fit indices available, but for now the user must calculate them manually.  The baseline model is available in the fitted model object, so incremental fit indices such as CFI and TLI can be computed.

A bug was fixed in the permuteMeasEq() function, but there is still a known issue that will be fixed in the next update to semTools.  Windows users who try to use the parallel-computing options in permuteMeasEq() will receive an error because the objects in the global environment are not available on the SOCK clusters.  Mac and Linux users will not receive an error if they use Fork clusters or the "multicore" option because the clusters will have access to the global environment.


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

Reply all
Reply to author
Forward
0 new messages