Hello, I am new to the stan, I trying to draw samples from the userdefined log pdf. But the fit I got is really nonesense. I am wondering what are mistakes I made in my code. Could any one help me with this?
functions {
real DSPwithWL_lpdf(vector beta, matrix cmatrix, vector y) {
return -sum(beta+exp(y-beta)) + 0.5*(beta)'*cmatrix*beta; // the log wittle likelihood with DSP
Hello, thank you so much for your reply.
Yes you are right! I made a mistake at + 0.5*(beta)β cmatrix beta. Here the β+β should be β-β.
What I am doing is to combine the whittle likelihood with the Dynamic shrinkage prior. The log conditional posterior distribution is proportion to the formula below.