Suppose I have a following formula for a mixed-effects model:
Precipitation ~ s(month,bs="cc")+s(time)+ humidity,random= ~(humidity|year)
and I know that humidity will only have positive effects on precipitation. So I want to specify a log-normal prior or other non-negative prior for humidity in rstanarm. Suppose the coeffienct for humidity is beta
.I would specify the prior as log(beta) ~ normal(0,10^4)
How should I do it? I don't think the default exponential distribution is a proper prior.
How to specify a lognormal prior or user-define non-negative prior in rstanarm?
304 Views Asked by Gigi Zheng At
1
That is not among the priors that are supported by rstanarm. That same syntax would work with brms, although you would need to specify a the prior like
However, a lognormal prior with 10^4 as the standard deviation of the logarithm is preposterous because it puts considerable probability on values that would overflow to infinity on a 64 bit computer.