Short summary of the problem
Hello, I am now training a BRMS model which includes a series of equations, and one of them is a categorical response. While I am trying to evaluate prediction results using training data, I encounter the following issue:
the following three lines does not have any bug and returns results
head(fitted(ms_100K_jun26, newdata=dc_100K_jun26[1:10,]), type="response")
head(posterior_epred(ms_100K_jun26, newdata=dc_100K_jun26[1:10,]), type="response")
head(posterior_predict(ms_100K_jun26, newdata=dc_100K_jun26[1:10,]), type="response")
However, when running the following line with “predict” function it throws dimension error:
predict(ms_100K_jun26, newdata=dc_100K_jun26[1:10,]), type="response"
Error in .fun(conv = .x1, ftitlelength = .x2, fdescriptionlength = .x3, :
arg 'condition' has dims=10, 8, 1; but need dims=10, 4, X
I dont understand this. Given predict is a wrapper on top of posterior_predict, I am guessing there is some bug in this function, rather in my model training. But I cannot debug with this limited error information. Could you please provide some insights?