Skip to content

Extend support for (b)lavaan models #517

Description

@mattansb

Related to easystats/effectsize#420

library(blavaan)

model <- '
  # latent variable definitions
     ind60 =~ x1 + x2 + x3
     dem60 =~ y1 + a*y2 + b*y3 + c*y4
     dem65 =~ y5 + a*y6 + b*y7 + c*y8

  # regressions
    dem60 ~ ind60
    dem65 ~ ind60 + dem60

  # residual correlations
    y1 ~~ y5
    y2 ~~ y4 + y6
    y3 ~~ y7
    y4 ~~ y8
    y6 ~~ y8
'

fit <- bsem(model, data = PoliticalDemocracy,
            dp = dpriors(nu = "normal(5,10)"))
insight::model_info(fit)
#> NULL
#> Warning message:
#> Could not access model information. 

Activity

  1. strengejacke commented on Mar 3, 2022

    @strengejacke
    Member

    We have only limited support for SEM. lavaan also only has a few methods, like get_parameters(). Not sure what relevant information could be included in the output?

  2. mattansb commented on Mar 3, 2022

    @mattansb
    MemberAuthor
    • n_obs
    • is bayesian = true
    • is_mixed - lavaan can be multilevel, maybe this is also true for blavaan?
    • is_multivariate - true if more than one outcome (which would be always?)
    • is linear = true (unless some outcomes are ordinal?)
      • link_function and family = identity + gauss (unless some outcomes are ordinal?)
  3. changed the title [-]Support `blavaan` models[/-] [+]Extend support for `(b)lavaan` models[/+] on Mar 3, 2022
  4. mattansb commented on Mar 25, 2022

    @mattansb
    MemberAuthor

    How do functions like find_predictors deal with multivariate models? Do they give a list of predictor for each variate, or just a vector of all the predictors?

  5. strengejacke commented on Mar 25, 2022

    @strengejacke
    Member
    m <- insight::download_model("brms_mv_1")
    insight::find_predictors(m)
    #> $cyl
    #> $cyl$conditional
    #> [1] "wt" "hp"
    #> 
    #> 
    #> $gear
    #> $gear$conditional
    #> [1] "wt" "hp"
    #> 
    #> 
    #> $carb
    #> $carb$conditional
    #> [1] "wt" "hp"
  6. DominiqueMakowski commented on Mar 25, 2022

    @DominiqueMakowski
    Member

    (@mattansb I am sending you a lot of motivating vibes for this one, having a complete support of SEMs in easystats would be awesome :)

  7. strengejacke commented on Jun 22, 2023

    @strengejacke
    Member

    @mattansb, did the vibes arrive?

  8. mattansb commented on Jun 22, 2023

    @mattansb
    MemberAuthor

    They did not....

    ThatsNotTheVibeIWasFeelingNotAVibeGIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement 💥Implemented features can be improved or revised

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions