I am very new here, and my question might seems a bit stupid.
So here is the thing, I have a dataset is about teacher’s belief/practice questionnaire and other stuff. I have already formed two Beyesian based 2PL model, and say I have the variable/posteriors of P (practice), Bg(general belief), Ba, Bb,Bc (dimension specific belief).
Now I’m thinking doing a regression on P~B, as I also have other (layered) data, for instance teacher’s schools, school SES, the districts, gender, yeargroup, etc.
(don’t know whether this is related to the problem but it is a very small dataset with 152 teachers, 33 schools, in 3 districts. and I’m thinking ideally I can do a 2 level regression)
My question is, ideally how can I transfer as much information as I can from the two BIRT models, to the later regression model?
I know it is really bad to just takeaway mean/median/mode, and I also think it is not okay to just include a variable with measurement error (from posteriors).
This question isn’t really about brms per se, so I’ll take a shot.
In Bayesian modeling, you can just fit everything jointly. If you have model A with data y and parameters theta, and model B, that uses data z, the parameters theta and additional parameters phi, you can think of this as two likelihoods, p(y | theta) for A and p(z | theta, phi). Rather than trying to fit models for p(y | theta) and then take a point estimate or summary of theta in the second model, you can just fit the model jointly as p(y, z | theta, phi). That transfers all the information.
Hi Bob, thanks for reply!
I know that Bayesian modeling can do jointly fit. But I’m not sure how to transfer latent variable between models.
I can give further details of my work. At the moment I have two IRT models
Model 1:
bf_bfl_grsm ← bf(
response | weights(weight) ~ 1 + (1|i|item) +
(1 | person) +
(0 + dima || person) +
(0 + dimb || person) +
(0 + dimc || person),
disc ~ 1 + (1 |i| item),
family = brmsfamily(“acat”, “logit”)
)
Model 2:
bf_p_grsm ← bf(
response_p | weights(weight_p) ~ 1 + (1|i|item) +
(1 | person),
disc ~ 1 + (1 |i| item),
family = brmsfamily(“acat”, “logit”)
)
So in model 1 I’ll have Bg(general belief) Ba Bb Bc (dimension specific belief)
in model 2 I’ll have P (practice)
these are all latent variables, but I want to transfer these info onto next regression model
model 3 (for instance):
P ~ 1 + Bg + Ba + Bb + Bc + school_ses + (1 | school_id)
I’m not so sure how to build up a joint model for these three in brms (I’m pretty sure stan can do this, but it might be too late for me to learn to reach a certain level to do it…)