jasp-stats / jaspfactor Goto Github PK
View Code? Open in Web Editor NEWThe Factor Module
The Factor Module
So there is a bit of a cluttered output in the tables when running a multi group cfa:
For some tables the structure is:
Group1
Group2
For instance the residual Cov table is differently structured which aligns with the SEM module's multi group output:
Table1:
Table2:
I would like to make this consistent. But I rather start with it, once the other PRs are merged. Any thoughts @Kucharssim?
Unit tests:
Small things:
To reproduce this one has to use the latest version for jaspFactor, which might not be in the nightlies yet.
However, in R one can:
library(lavaan)
dt <- read.csv("https://raw.githubusercontent.com/jasp-stats/jasp-desktop/development/Resources/Data%20Sets/Data%20Library/14.%20SEM/Grand%20Point%20Average.csv", header = T)
mod <- "
f1 =~ gpa1+ gpa2+ gpa3+ gpa4+ gpa5+ gpa6
f2 =~ job3+ job4+ job5+ job6
f1 ~ c(0, NA)*1
f2 ~ c(0, NA)*1
"
fit <- cfa(mod, dt, std.lv = TRUE, group = "admitted", meanstructure = TRUE)
fitmeasures(fit)
summary(fit)
this part is also what is produced through JASP:
f1 ~ c(0, NA) * 1
f2 ~ c(0, NA) * 1
stems from here: https://github.com/juliuspf/jaspFactor/blob/invarianceFix/R/confirmatoryfactoranalysis.R#L323-L333
I am confused and wonder why this piece of model syntax is added. It seems sufficient to just set meanstructure to TRUE.
I obtain standard error issues (can't be calculated) if the model syntax is specified like above, but no issues when only meanstructure=TRUE
and the piece of code is omitted from the model syntax. All other estimates stay equal.
In terms of model syntax this should mean that the mean of the first factor for group 1 is set to 0 and the mean for the second group is forced to be a free parameter.... but why
As I understand this, with meanstructure you can either estimate the latent means or the manifest means. By default it is always the manifest means that are estimated, and only if one forces the manifest means to be zero in the model.syntax will the model estimate the latent means. But we do not have that option in JASP, so in any case the latent means will always be zero.
I suggest to not label the intercepts for the factors when we have multiple groups since meanstructure=TRUE
is specified either way when the meanstructure option is chosen. The other parameter estimates won't change, it would only lead to fewer convergence issues since there are two degrees of freedom more.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.