I’m trying to interpret the results of my lognormal regression model fitted with brms. I’ve looked at the excellent notes that folks have referred to in similar threads (e.g. [FAQ How do I interpret a regression model when some variables are log transformed?]) and think I understand them, but I just need to be sure that when transforming the axes for my plots I’m using the correct interpretation.
So my call the the model is;
lognorm_multi_elq3 <- brm(formula = sales ~ 1 +
APD +
(1 + APD | ID ),
data = elq3,
family = lognormal(),
prior = set_prior("normal(1,10)", class = "b"),
iter = 10000)
So I think I understand that the lognormal model is reporting the parameters on the log scale. So for the population-level intercept term, that means exp(Intercept) is roughly the value of sales when all independent variables are at 1 (not 0, because exp(0) = 1).
If I use the following transformation in the call to mcmc_areas()…
# plot the intercepts for a subsample of 10 ids
mcmc_areas(
model_object,
pars = vars(param_glue("r_ID[{id},{var}]",
var = c("Intercept"),
id = sample(data$ID, 10))),
prob = 0.8, # 80% intervals
prob_outer = 0.95, # 99%
point_est = "median",
transformations = function(x) (exp(x)* exp(fixef(model_object)[1]))
) + geom_vline(xintercept=exp(fixef(lognorm_multi_elq1)[1]), size=1.5, color="grey") + labs(x = "Sales")
So here exp(fixef(model_object)[1])
will give us the intercept (which is at index [1] in the output of fixef(model_object)) in the original scale (sales in $), and the transformation calculates id-level intercepts as a proportion of that population level intercept.
Now the situation with the beta (slope) parameters are a little more tricky to me. If exp(beta) of the population-level beta is the % increase for every unit increase in APD (or 1 SD increase if I’ve scaled and centered my independent variables), then what are the exp(beta_id) i.e. id-level betas? Are they an additional % increase per unit increase in APD, or are they also a multiplicative? Because of the way I’ve written my model formula above I feel like it’s an additional increase, example if exp(beta) for a population is 1.03 and exp(beta_id) for this ID is 1.03, the total increase in sales for a 1 SD increase in APD would be 6% for this ID. Is that correct?