Link_sigma for lognormal family

When using the lognormal() family in brms the link specification is not behaving as expected. When I specify "link_sigma = ‘identity’ " versus "link_sigma = ‘log’ " I do not see a change for “Links:” when I use summary on the model. At first I thought that this was maybe just because the text wasn’t being updated in the summary, but then I checked the underlying stan code on a simple model and I do not see it change as expected (I thought it would change the likelihood in the model block).

Here is a MWE:

dat <- data.frame(y=rpois(100, 10), x = rnorm(100, 50, 10))
m1 <- brm(y~x, family=lognormal(link = "identity", link_sigma = "identity"), data = dat)
m2 <- brm(y~x, family=lognormal(link = "identity", link_sigma = "log"), data = dat)

# summary doesn't reflect link difference
summary(m1)
summary(m2)

# expected difference doesn't show up
stancode(m1)
stancode(m2)

One possibility is that I am misunderstanding how a link function operates on the sigma term. Could someone please clarify what the model notation should be for m1 and m2 above with a log link for sigma? With some default priors I would have thought:

m1:
y_i ~ logNormal(u, sigma)
u_i = intercept + B_1*x_i
B_1 ~ Norm(0, 10)
sigma ~ StudentT(3, 0, 10)

m2:
y_i ~ logNormal(u, sigma)
u_i = intercept + B_1*x_i
B_1 ~ Norm(0, 10)
log(sigma) ~ StudentT(3, 0, 10)

Thank you in advance!

  • Operating System: MacOS 10.13.6
  • brms Version: 2.10.0
1 Like

Hi!

The link function only apply if you use predictors for sigma, that is

y_i \sim logN(\mu_i, \sigma_i)\\ \mu_i = X_i\gamma\\ log(\sigma_i) = Z_i\gamma \equiv \sigma_i = e^{Z_i\gamma}

Hope it helped!
Lucas

1 Like

Ah of course! And that obviously clears up the brms presentation of the model.

Is it correct then to think that in the model formulation you presented the variance is modeled as a function of the predictors such that it could increase (or decrease) with the mean?

Thank you!

In the log-normal distribution, variance vary mathematically with the mean, \sigma represents the geometric standard deviation. The wikipedia page give the following formulation of the variance :

V(x) = (e^{\sigma^2}\!\!-1) e^{2\mu+\sigma^2}

In the previous model, sigma parameters may vary in function of predictors that may or may not be the same as for the mean. In this case, you will evaluate the effect of predictors on the geometric standard deviation, that is the multiplicative error.