0
votes

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.

1

1 Answers

0
votes

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

my_prior <- prior(lognormal(0, 1e4), coef = "humidity")

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.