Git Product home page Git Product logo

Comments (2)

mvuorre avatar mvuorre commented on August 26, 2024

The issue here seems to be a lack of sampling model for "x". This could help: paul-buerkner/brms#888 (comment)

from funky-firefly.

mvuorre avatar mvuorre commented on August 26, 2024

Univariate latent means model is simple with brms.

Multivariate latent means models can be specified by 1. Stacking data wrt. outcome and 2. using indicator variables for outcomes to turn parameters on and off. An example sketch of Model 4 in http://dx.doi.org/10.1037/met0000250 would be to first stack the data thuswise:

d2 <- d |> 
  pivot_longer(c(urge, dep)) |> 
  mutate(
    is_urge = if_else(name == "urge", 1, 0),
    is_dep = if_else(name == "dep", 1, 0)
    )
d2 <- d2 |> 
  left_join(d)

Then estimate this model

bform <- bf(
  value ~ 
    is_urge * alpha + 
    is_dep * depb +
    is_urge * (phi * (urge_lag - alpha)) + 
    is_urge * (beta * (dep - depb)),
  alpha + phi + beta + depb ~ (1 || person),
  nl = TRUE
)

I've confirmed that this gives exactly the same posterior summaries as in their MPlus estimation. Now on to making progress with the rest...

from funky-firefly.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.