Request for the Swain function to address small sample size issue

76 views
Skip to first unread message

Jinjing Fang

unread,
Dec 19, 2019, 5:38:41 PM12/19/19
to lavaan
Hello everyone,

Right now I am analyzing the data for my thesis project on the R platform, using CFA to test the existing models and MGCFA to test the multi-group invariance. 

However, I encountered a situation of small sample size of the subgroups of my participants (<100). I was suggested to use the Swain function in R to address this issue. I reviewed the literature of the Boomsma and Herzog (2013), but the web page provided was not available anymore.

I am wondering if any of you could kindly share the R script of the Swain function to me please? It would be a huge help for my thesis project. 

Otherwise, are there any other options to deal with small sample sizes?

Many thanks in advance!!!!

:)

Chris Koenig

unread,
Dec 19, 2019, 5:55:53 PM12/19/19
to lavaan
Hope this helps (and that it's the correct one).

Best,
Chris
swain12.R

Jinjing Fang

unread,
Dec 19, 2019, 6:33:49 PM12/19/19
to lavaan
Hi Chris,

Thank you so much!!!

Cheers,
Jinjing

Yves Rosseel

unread,
Dec 20, 2019, 1:24:32 PM12/20/19
to lav...@googlegroups.com
As the original website went offline, I made a copy and provide it here:

http://lavaan.org/swain/swain.R (the original R file)
http://lavaan.org/swain/swain.pdf (the documentation)

Yves.
> --
> 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
> <mailto:lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lavaan/1259600d-afae-4169-8303-97aa86cd3915%40googlegroups.com
> <https://groups.google.com/d/msgid/lavaan/1259600d-afae-4169-8303-97aa86cd3915%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jinjing Fang

unread,
Dec 23, 2019, 4:33:47 PM12/23/19
to lavaan
Hi Professor Rosseel,

Thank you for providing these! 

Merry Christmas :)

Cheers,
Jinjing


On Saturday, December 21, 2019 at 7:24:32 AM UTC+13, Yves Rosseel wrote:
As the original website went offline, I made a copy and provide it here:

http://lavaan.org/swain/swain.R (the original R file)
http://lavaan.org/swain/swain.pdf (the documentation)

Yves.

On 12/19/19 11:38 PM, Jinjing Fang wrote:
> Hello everyone,
>
> Right now I am analyzing the data for my thesis project on the R
> platform, using CFA to test the existing models and MGCFA to test the
> multi-group invariance.
>
> However, I encountered a situation of small sample size of the subgroups
> of my participants (<100). I was suggested to use the Swain function in
> R to address this issue. I reviewed the literature of the Boomsma and
> Herzog (2013), but the web page provided was not available anymore.
>
> I am wondering if any of you could kindly share the R script of
> the Swain function to me please? It would be a huge help for my thesis
> project.
>
> Otherwise, are there any other options to deal with small sample sizes?
>
> Many thanks in advance!!!!
>
> :)
>
> --
> 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

Terrence Jorgensen

unread,
Jan 3, 2020, 4:47:53 PM1/3/20
to lavaan
I wasn't aware of the Swain correction.  I just added it as a new option to the chisqSmallN() function in semTools, which already implemented the Bartlett k-factor correction (studies seem to show Swain's correction works better).  I added a couple options from Yuan and colleagues, too.  You can install the development version to access it.

devtools::install_github("simsem/semTools/semTools")

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

Reply all
Reply to author
Forward
0 new messages