jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

A wish: Confirmatory Factor Analysis #97

Closed mozny closed 5 years ago

mozny commented 6 years ago
abnormally-distributed commented 6 years ago

I second this as a useful feature. It'd also be really cool if there was the ability to create factor scores, like in SPSS.

CasperAtUU commented 6 years ago

Seconded. We use CFA in a course on measurement, it's a very useful method. It's part of the Lavaan package in R, and I'd love to see it added to JASP since students have a pretty hard time using R to perform the analysis (they are familiar with SPSS).

EJWagenmakers commented 6 years ago

@vankesteren ?

Kucharssim commented 6 years ago

Note that it is possible to conduct CFA in JASP using the SEM module. However, the model has to be specified using the lavaan syntax (so it is only slightly easier than doing it in R) and currently it is not possible to obtain factor scores directly. Maybe it’s a good idea to create a CFA in the Factor analysis menu to enable some simple factor models by point and click...

vankesteren commented 6 years ago

We will implement this reasonably soon!

WilhelmKuntner commented 6 years ago

Hello! This is my first post here, so I wanted to thank for JASP!!

In the SEM tab there is the advanced option to define several models (up to nine). Intuitively I would expect to be able to select and re-edit a model previously entered. However, JASP seems to overwrite the content of the model-slot selected by the drop-down menu with the actual content of the editing window. Intuitively I would expect to have the option to either read a previously entered model or to overwrite it (or rather delete it). Moreover, if the editing window is empty, selecting a previously defined model will not delete it.

Many thanks again for this great project and kind regards!

EJWagenmakers commented 6 years ago

Thanks! @vankesteren, any comments on this request? :-)

vankesteren commented 6 years ago

Hey @WilhelmKuntner,

yes, this advanced option is some legacy code. In the future, we will edit this so that the user interface will be more intuitive in this regard. It works in a way, but indeed it is currently implemented such that the model is overwritten every time, so you'll have to start with the simplest model and build up from there (and never touch your original model again). Hence we relegated it to the "advanced" tab.

Something you could do is write down your models in a text editor and copy/paste them once.

Might I ask which model comparisons you're specifically thinking about? I am currently working on an intuitive CFA module that includes some model comparisons such as measurement invariance testing. I could implement your ideas if it's relevant to more users!

WilhelmKuntner commented 6 years ago

Hi @vankesteren,

at the moment I am using RStudio with R Markdown, where the work flow in fact comprises lots of copy-and-paste operations.

I am trying to ascertain the dimensionality of a psychometric scale. Accordingly, a one-factor-model is tested against a two-factor-model by means of a CFA. Once I will be sure about the dimensionality (see below), I'm planning to check for measurement invariance across the German and the Italian version of the items as well as across females and males (within a German speaking sample). While doing so, I've been trying to find the best way to deal with non-normally distributed data on a 5 point Likert scale, and sample sizes ranging between ca. 600 and 100 cases, depending on language and sex. Therefore, while consulting some relevant literature (Bandalos, 2014; DiStefano & Morgan, 2014; Li, 2016a, 2016b), I am also comparing the results obtained by using the diverse estimators provided by lavaan (ML vs. MLM vs. MLR vs. DWLS vs. WLSMV).

So, based on my special case, an ideal work-flow with JASP would permit to store both the model syntax and all other sem()/cfa() settings. The most tangible advantage compared to the work-flow within RStudio would be:

  1. Avoiding the sequential structure of an R Markdown (which makes sense when making automated reports) file while being able to enter and select diverse configurations of a CFA (or SEM).
  2. Obtaining automatically a comparison table of the diverse fit.measures.

References:

WilhelmKuntner commented 6 years ago

(@vankesteren) ... but then, given that the JASP SEM-module is probably interesting especially to scholars who still are rather inexperienced in terms of SEM (including myself), my above suggestion could lead to a so-called "data-torturing". The counterpart is, of course, a theory-led procedure. Anderson and Gerbing (1988) proposed a two-step approach to CFA. An optional template for running CFA following this (or any other, more up-to-date) procedure may be useful in order to keep things consistent and systematic. I cannot say how that fits in with JASP's goals. This is indeed to be understood as a spontaneous idea not thought through in detail. However, this idea seems to resemble an imperative I read somewhere on the JASP website, which claims that JASP shouldn't leave alone inexperienced (or lazy) users with typical pitfalls of statistical analysis.

vankesteren commented 6 years ago

@WilhelmKuntner Thank you for your detailed feedback!

vankesteren commented 5 years ago

As of JASP 0.10, we have CFA!