I am trying to use a GLM-like model to infer intercepts and slopes associated to certain experimental conditions. I am using the pystan interface and writing down the design matrix that multiplies these coefficients (so not using stan_glm or anything like that) – besides some details for all purposes here this can be treated like a regular GLM with log link.
My issue is: for all bur the grand mean I want to specify priors that have a (possibly normal) distribution with greatest probability of having no effect. For a linear model that could be something like:
model {
beta1 ~ normal(0,1);
beta2 ~ normal(0,1);
vector[N] mu = beta0 + beta1 +beta2*x;
y ~ normal(mu, sigma);
}
that would make the probability of effects 1 and 2 be most likely zero in the absence of information from the likelihood, but GLM it is not the same:
model {
beta1 ~ normal(0,1);
beta2 ~ normal(0,1);
vector[N] log_mu = beta0 + beta1 +beta2*x;
y ~ poisson(exp(log_mu));
}
is it possible to specify a prior that when exponentiated will result in a zero effect. I am assuming there can’t be a prior beta1 ~ normal(-Infinity,1)
. Would a lognormal be the “canonical” prior for this link function, or is it actually the other way around? Never used link functions before. Thanks.