jasp-issues icon indicating copy to clipboard operation
jasp-issues copied to clipboard

[Feature Request] Run a lavaan program by itself?

Open PhillipKWood opened this issue 3 months ago • 8 comments

Description

Being able to directly run a lavaan program is useful when the default options of growth curves and SEM are not appropriate

Purpose

growth curve modeling such as FM-Shift and latent basis growth models

Use-case

studies of longitudinal growth/decline

Is your feature request related to a problem?

The growth curve module requires fixed factor loadings and sem requires the choice of either factor means or manifest intercepts but not both

Is your feature request related to a JASP module?

No response

Describe the solution you would like

I would like to be able to load a lavaan program into the R module and be able to execute it

Describe alternatives that you have considered

None seem available

Additional context

Here is an example of a lavaan program that I can't do: Fig13.6Model<-"

regressions

RI=~L1wisc_1 RI=~L2wisc_2 RI=~L3wisc_3 RI=~L4wisc_4

residuals, variances and covariances

wisc_1 ~~ V_e1wisc_1 wisc_2 ~~ V_e1wisc_2 wisc_3 ~~ V_e3wisc_3 wisc_4 ~~ V_e4wisc_4 RI ~~ 1.0*RI

means

RI~a11 wisc_1~t11 wisc_2~t11 wisc_3~t11 wisc_4~t1*1 "

PhillipKWood avatar Sep 17 '25 13:09 PhillipKWood

@PhillipKWood Thx for the report. Have you tried the SEM module? There you can put in lavaan directly. I do not know if the rest of the interface is ideal for growth models however.

tomtomme avatar Sep 17 '25 13:09 tomtomme

indeed @PhillipKWood, @tomtomme is right, in the SEM analysis in the SEM module you can include any lavaan syntax.

juliuspfadt avatar Sep 26 '25 10:09 juliuspfadt

The problem is that the identification buttons override the identification in the code. Sometimes we need to mix identification strategies such as having one factor with unit variance and another one with freely estimated variance. FWIW Phil

On Fri, Sep 26, 2025 at 5:52 AM Julius Pfadt @.***> wrote:

juliuspfadt left a comment (jasp-stats/jasp-issues#3698) https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338111536

indeed @PhillipKWood https://github.com/PhillipKWood, @tomtomme https://github.com/tomtomme is right, in the SEM analysis in the SEM module you can include any lavaan syntax.

— Reply to this email directly, view it on GitHub https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338111536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKAXEHN3TZZ6U4IVXKTAL3UULGZAVCNFSM6AAAAACGYHNPHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMZYGEYTCNJTGY . You are receiving this because you were mentioned.Message ID: @.***>

PhillipKWood avatar Sep 26 '25 12:09 PhillipKWood

Can you give a specific example what you would like to do? And if so, can you write it as one block of code please? when I look at the interface you can turn of the factor scaling and do it via lavaan syntax, when you choose "none". However, you are right, the mean structure can not purely be forced through the syntax, but has to be clicked. That is unfortunate and should be possible. So then you would not have to click on mean structure to get the output for intercepts but would just get it because of your syntax.

juliuspfadt avatar Sep 26 '25 13:09 juliuspfadt

Apologies- you're right- I didn't see the "none" option- this can be closed. The effects coding strategy doesn't impose the right constraints on the intercepts, but that's a separate issue- thanks! Phil

On Fri, Sep 26, 2025 at 8:13 AM Julius Pfadt @.***> wrote:

juliuspfadt left a comment (jasp-stats/jasp-issues#3698) https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338675397

Can you give a specific example what you would like to do? And if so, can you write it as one block of code please? when I look at the interface you can turn of the factor scaling and do it via lavaan syntax, when you choose "none". However, you are right, the mean structure can not purely be forced through the syntax, but has to be clicked. The is unfortunate and should be possible. So then you would not have to click on mean structure to get the output for intercepts but would just get it because of your syntax.

— Reply to this email directly, view it on GitHub https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338675397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKAXFJPNMQ4KAUWBFIJO33UU3WDAVCNFSM6AAAAACGYHNPHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMZYGY3TKMZZG4 . You are receiving this because you were mentioned.Message ID: @.***>

PhillipKWood avatar Sep 26 '25 13:09 PhillipKWood

I think this should still stay open, cause writing intercepts in the syntax does not produce them in the output without measnstructure and the fixing options checked.

juliuspfadt avatar Sep 26 '25 13:09 juliuspfadt

You are right. I was in a hurry to apologize ahead of class ;-)

On Fri, Sep 26, 2025 at 8:31 AM Julius Pfadt @.***> wrote:

juliuspfadt left a comment (jasp-stats/jasp-issues#3698) https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338744826

I think this should still stay open, cause writing intercepts in the syntax does not produce them in the output.

— Reply to this email directly, view it on GitHub https://github.com/jasp-stats/jasp-issues/issues/3698#issuecomment-3338744826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKAXDHUQQ5BJHYZFFKSLL3UU5ZTAVCNFSM6AAAAACGYHNPHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMZYG42DIOBSGY . You are receiving this because you were mentioned.Message ID: @.***>

PhillipKWood avatar Sep 26 '25 13:09 PhillipKWood

will be fixed in the next release. if you want to try it earlier, you can wait until the linked PR is merged and then check out a nightly build https://static.jasp-stats.org/Nightlies/

juliuspfadt avatar Oct 06 '25 07:10 juliuspfadt