Hello people! Coud I use different beta functions (different distribution functions) for different X predictors in a same multivariate model?
Not knowing the details of the model, I would say yes.
You could create a
Beta distribution like this:
pm.Beta("bravo", alpha=[1,2,3], beta=[3,2,4]), which would be
If you want to use entirely different priors for the predictors, you could concatenate them:
import theano.tensor as tt X = tt.concatenate([ pm.Normal(...), pm.Beta(...), pm.Gamma(...), ]) # optional: X = pm.Deterministic("X", X) # (Deterministic variables will show up in the trace)
Does this answer your question?
Thanks Michael for your answer!
Yes, answer my question!
But I have another problem!
My biggest concern is to multiply the different betas by matrices (different dimensions) of X predictors and then add them in the model. Will the ‘concatenate’ function complain about these different dimensions?
y = alpha + Beta1.X1 + Beta2.X2 + Beta3.X3 + Gamma1.X4 + Gamma2.X5
With different X predictors how can I build the equation ?:
y = a + pm.math.dot(X, betas) + pm.math.dot(X, gammas)
A dot product should be fine. You might just need to transpose something, but there is no reason why you can’t write down the y equation
Thank you very much!!