PIECEWISE STRUCTURAL EQUATION MODELING with brms and family=cumulative()

I am very new to this, but I have manage to run this code:

bf_1 ← bf(Response ~ Type + gender + treatment+ Exam + (1|Course:ID)) + gaussian()
bf_2 ← bf(Score ~ Response + Exam + (1|Course:ID)) + gaussian()

fit3 ← brm(
bf_1 + bf_2 + set_rescor(FALSE),
data = base.analysis,
chains = 6, cores = 6,
control = list(adapt_delta = 0.95)
)

Response = answeres of a survey I gave my students. This is a 1-7 respons (Likert scale).

Type = The questions they ansered is categorized into two “types”.

treatment = some of them is in a treatment group, given an intervention (0 = control, 1=treatment).

Exam = The first or second exam (1 or 2). I want to see if students improved their score, specially if they were in the treatment group.

I am also interested to see if the treatment changed how they answered (Response) between the first and second exam. The questions are about their anxiety towards the test, and my hypothesis is that the treatment group will have lower respons (lower anxiety) and score better.

But! since the responses are on a Likert scale, I was hoping to use family = cumulative() on the first model (bf_1). But when I run it with family = cumulative() it doesnt seem to work correctly… For example it is not able to draw the predictions.
Again, I am very new to this, so maybe I am doing something stupid. But I think the problem is that when calling for cumulative, it gives multiple intercepts, and that might be the issue when it then tries to use those predicted intercepts to the response “Score” in the next model?

I appreciate all the help I get get.
Thanks

-R

Welcome Ruben.
You may need to flesh out your question with an example or fake dataset. Can you get a simple example with family = cumulative() working?

But I think the problem is that when calling for cumulative, it gives multiple intercepts, and that might be the issue when it then tries to use those predicted intercepts to the response “Score” in the next model?

I may be wrong here, but I don’t think brms will connect the two models like you’re thinking (piecewise SEM) since residual correlation was turned off (set_rescor(FALSE)) – hopefully someone else advises here. Does the model for bf_2 on its own match what you’re seeing?