Hi,
I am new to the pymc3 community, and I have a question on how to apply spike and slab prior on variables.
Here is my model:
\beta and \gamma are vectors with length = n, in other words, length(beta) == length(gamma) ==n .
I cannot find examples showing mixture on the variables, and I am not sure what I wrote is correct or not.
here is my pymc3 model:
sigma_1 = pm3.HalfCauchy('sigma_1',5)
sigma_e= pm3.HalfCauchy('sigma_e',5)
pi = pm3.Beta('pi',1,1)
gamma = pm3.Bernoulli('gamma',p = pi,shape = n)
mixture_sd = pm3.math.switch(gamma > 0.5, sigma_1, 0.001)
beta = pm3.Normal('beta',mu = 0,sigma = mixture_sd, shape = n)
mu = tt.dot(X,beta)
likelihood = pm3.Normal('y',mu = mu, sigma = sigma_e,observed = y)
The mean(posterior) for \pi and \gamma are too small to be true. The program almost always reports that all of the \beta_i comes from N(0,0.001^2).
I would really appreciate it if someone can help me on this.
Thanks