EFA and CEFAPak

199 views
Skip to first unread message

Bla Blu

unread,
Jun 10, 2020, 4:01:57 AM6/10/20
to lavaan
Hello,

does anybody have some experience with the program CEFAPak?
I am meant to use it for an exploratory factor analysis and just don´t understand how to import the data. So, if you have any hints or know some understandable explanations I´d be so happy to hear about them:-).

Thanks,

Elena

balal izanloo

unread,
Jun 10, 2020, 4:34:25 AM6/10/20
to lav...@googlegroups.com
Hi there
Hear is lavaan group, an R package for CFA/SEM analysis. If you want you can do EFA in CFA framework by lavaan (E/CFA), see this page.
you can do EFA in R by psych  or factanal. 
Do you see the attached file that shows how to import your data to CEFAPak(page 6). 

hth 

--
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/915a86a4-f1d4-4196-97ee-180587e38cd7o%40googlegroups.com.
CEFAdoc.pdf

balal izanloo

unread,
Jun 10, 2020, 4:37:24 AM6/10/20
to lav...@googlegroups.com
see also attached file


On Wed, Jun 10, 2020 at 12:32 PM Bla Blu <blu7...@gmail.com> wrote:
--
luo2019.pdf

Bla Blu

unread,
Jun 10, 2020, 9:14:53 AM6/10/20
to lavaan
Hi,

unfortunately, with my data I need the more sophisticated rotation options with CEFAPak, so that´s why I can´t do the EFA with R.
As I couldn´t find any site related to CEFAPak I thought here might be a could place to try since it´s also for doing EFAs.
I had already read the explanation that comes along with CEFAPak but I just don´t get it how to import the data:-(

Thanks still!

Nickname

unread,
Jun 11, 2020, 9:22:48 AM6/11/20
to lavaan
Elena,
  Did you find the answer in the CEFA documentation?  The short answer is that you do not import your data into CEFA (CEFAPac is just the installation file).  Use the menu system to create an input file.  At the bottom of that file, if memory serves, CEFA will add some text that says "remember to paste your data".  You can analyze raw data or a variety of dispersion matrices.  The GUI is just a front end for CEFA, which runs silently in the background.  (The trick is that you do not start with step 1 on the menu system, you start and the end and then loop back to 1.)  The command file tells CEFA how to process your input file and write an output file.  Your results are then saved in the output file.  To the best of my knowledge CEFA is no longer under development and no longer supported.  It was a great program while it lasted.  If you cannot figure it out, contact me off list and I can send you a set of example files.  Your question is very off topic for this list.

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/

Florian Scharf

unread,
Jun 12, 2020, 12:53:58 AM6/12/20
to lavaan
Could you briefly elaborate on what kind of rotation option you mean? We are actually quite far implementing ESEM and therefore EFA in lavaan but it is not yet documented because there are some refinements that need to be done still before we let this out for everyday use. (I spare you the technical details.)

However, if you tell me more about what you want to achieve, we can try and run your model in lavaan and another package like MPLUS or CEFA.

Best,
Florian

Bla Blu

unread,
Jun 15, 2020, 9:39:14 AM6/15/20
to lavaan
Hi Florian,
honestly, I don´t know that. My supervisor just told me to `use CEFAPak for its sophisticated rotation options`. But as I´ve never heard from that program and we didn´t have it in our master I am quite lost.
The problem I´ve encountered in R is that the results of an EFA don´t match at all the theoretical expectations and from what I understand now from CEFAPak is, that I could try to predefine on which factors the items are meant to load.
If there´s a way to do that in R I´d be really happy.
Best regards,

Elena

Steve Miller

unread,
Jun 15, 2020, 9:56:36 AM6/15/20
to lav...@googlegroups.com
That's referred to as targeted rotation, and is usually thought of as somewhere between EFA and CFA.   I've seen a number of ways to do that in R, though I don't recall them off the top of my head.   For example, a quick google search revealed this, which discusses targeted rotation (a little):


Best,
Steve

 

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

Katalin Grajzel

unread,
Jun 15, 2020, 10:04:02 AM6/15/20
to lav...@googlegroups.com
Just quickly chiming in from a methodological perspective. Elena, maybe you should look at your data and the theory again and try to figure out what the results mean instead getting your items to load on specific factors. It is often very exciting to find something different because it could mean that you have discovered something new. 
Katalin 

balal izanloo

unread,
Jun 15, 2020, 10:13:41 AM6/15/20
to lav...@googlegroups.com
Hi again
1) based on the sentence in your message "I could try to predefine on which factors the items are meant to load."  you can use confirmatory factor analysis (CFA) by lavaan and check fitting of your model to your data. 
2) Also you can run exploratory CFA  by lavaan, but I am not sure lavaan can handle this method. 

--

Florian Scharf

unread,
Jun 15, 2020, 10:22:29 AM6/15/20
to lavaan
Hi Elena,

there are (as always) multiple ways to proceed under your circumstances. First of all, if you have specific expectations, I would start with a CFA in which you put your theoretical model to a test. This will probably tell you that you have a bad fit - that happens but you should properly conclude this from a CFA, this is the clearest way if there are specific expectations.

From this point on, it depends a bit on what you would actually like to achieve and how bad your misfit is. Your bad fit may just come from unexpected cross-loadings or the model may be even more wrong (e.g. wrong number of factors). Therefore, I would first try to confirm that the number of factors is reasonable - no "sophisticated rotation" will be able to deliver reasonable results with the wrong number of factors. Therefore, check multiple criteria for the number of factors and see what you get (see here for more elaborated guidelines: https://www.researchgate.net/publication/330546928_How_to_Determine_the_Number_of_Factors_to_Retain_in_Exploratory_Factor_Analysis_A_Comparison_of_Extraction_Methods_Under_Realistic_Conditions).

Once you have decided on the number of factors, you can decide how to proceed. If your number of factors was fine, you can continue with some semi-confirmatory approach such as target rotation as suggested by Steve. But you could also go fully exploratory and see what you get, e.g., using a Geomin rotation - you may discover that an unexpected but simple solution occurs but it can also happen that you don't get an interpretable result in which case you would need to rethink your questionnaire if you aim for developing a questionnaire with a more or less simple structure. If your number of factors was wrong, I would go fully exploratory anyways. 

If the ultimate goal of your analysis is to analyze a structural model, I can help you achieve this in lavaan - but you would first need to do your "homework" regarding this measurement model.

I hope, this is helpful.

Best,
Florian

Bla Blu

unread,
Jun 16, 2020, 6:54:15 AM6/16/20
to lavaan
Wow,

thank you for all those helpful comments, hints and ideas.
So, I am trying to come further with all this in mind.

Best regards,

Elena


Am Mittwoch, 10. Juni 2020 10:01:57 UTC+2 schrieb Bla Blu:

Bla Blu

unread,
Jun 17, 2020, 5:35:02 AM6/17/20
to lavaan
Hi Florian,

right, the CFA produced quite a bad fit. And with the "normal" EFA I could reproduce the factor numbers, but one factor combines quite a lot of items. As there is sound theoretical grounding to assume the four-factor(or four facettes, actually)-structure, which is also backed by parallel analysis and scree plot I´d like to try a targeted rotation.
So, as you said you could give me some help with that, I wanted to ask if you have some hints on what could be wrong here?
EfaSJTS <- efa(Korr_Mat.B, n.obs = 187, dist="ordinal", 4, rtype="oblique", fm="ml", rotate="CF-quartimax", useorder=TRUE)

I used EFAutilities, the package recommended above, as I didn´t find a target rotation in lavaan.
Now, this order produces only error warnings. I guess, because I couldn´t figure out, how to provide the order/target matrix and I am also a little bit confused about the other options.

I´d really appreciate your help.

Thank you.
Elena

Florian Scharf

unread,
Jun 17, 2020, 7:05:54 AM6/17/20
to lavaan
Hi Elena,

the EFA features in lavaan are not yet document as we are still trying to figure out some rarely occurring estimation problems.

The EFAutilities package is a very fine package. 

You can find an example how to use a target rotation here:
(p. 10)

Actually, it's a partial target rotation, that is, you don't have to guess all target values but instead you can tell it some values and say "estimate for the others whatever comes out".

Therefore, you have to specify targets and weights. A weight of 0 means ("Don't care about the value of this loading.").

I would try, to specify all cross-loadings to zero und only put weights on these. In an oblique case, you also need a target for the factor correlation matrix (but you can leave this open if you don't have any specific expectations such as orthogonality between certain factors).

What you could also try is a geomin rotation with an increased epsilon of say 0.5. This results in a rotation that can handle cross-loadings quite well. See, e.g., here: https://www.tandfonline.com/doi/pdf/10.1080/10705511.2018.1558060?needAccess=true (Disclaimer as this is my own paper: No, advertisement intended, there are other sources for this, this was just the quickest way to underline the idea.)

I would expect that some of your facets are highly correlated and that this results in a partially conflated solution. It is a well-established finding that some oblique rotations tend to produce such conflated solutions. 

Lastly, I would like to remind you of being open to the possibility that the original factor model is wrong (or at least cannot hold for your data set). Therefore, I'd invite you to be transparent about the CFA result and just tell the reader about these problems.

Bla Blu

unread,
Jun 18, 2020, 3:01:51 AM6/18/20
to lavaan
Hi Florian,

thank you for all those hints and references!
I am doing my best and trying to work with that:-).



Am Mittwoch, 10. Juni 2020 10:01:57 UTC+2 schrieb Bla Blu:
Reply all
Reply to author
Forward
0 new messages