# Brms output interpretation

I have to comment on a random effects beta regression model not constrained by me, but I cannot interpret the results.
The dependent variable is the death rate (Circulatory) while the independent variables are Age, GDP (PIL) and Year.

The user code is:

``````bcpriors<- get_prior(Circulatory~s(Age)+PIL+(1|Year), data=dati, family="beta")

modello<- brm(Circulatory ~s(Age)+PIL+(1|Year), data=dati, family="beta",
prior = bcpriors)
print(summary(modello))
plot(modello)
modello\$prior
modello\$fit

``````

I would like to comment on the outputs of modello\$fit, modello\$prior and summary(modello), but I cannot understand the coefficients and the construction of the model.

The modello\$prior output is:

``````> modello\$prior
prior     class      coef group resp dpar nlpar bound       source
(flat)         b                                            default
(flat)         b       PIL                             (vectorized)
(flat)         b    sAge_1                             (vectorized)
student_t(3, 0, 2.5) Intercept                                            default
gamma(0.01, 0.01)       phi                                            default
student_t(3, 0, 2.5)        sd                                            default
student_t(3, 0, 2.5)        sd            Year                       (vectorized)
student_t(3, 0, 2.5)        sd Intercept  Year                       (vectorized)
student_t(3, 0, 2.5)       sds                                            default
student_t(3, 0, 2.5)       sds    s(Age)                             (vectorized)

``````

The modello\$fit output is:

``````> modello\$fit
Inference for Stan model: 96176ae9309141fda408b2c64938417b.
4 chains, each with iter=2000; warmup=1000; thin=1;
post-warmup draws per chain=1000, total post-warmup draws=4000.

mean se_mean   sd     2.5%      25%      50%      75%    97.5% n_eff Rhat
b_Intercept               -2.31    0.00 0.04    -2.39    -2.33    -2.31    -2.28    -2.23   839    1
b_PIL                      0.05    0.00 0.00     0.05     0.05     0.05     0.05     0.05   830    1
bs_sAge_1                  2.80    0.01 0.53     1.77     2.44     2.81     3.16     3.82  2899    1
sd_Year__Intercept         0.08    0.00 0.01     0.07     0.08     0.08     0.09     0.10   792    1
sds_sAge_1                 3.83    0.04 0.92     2.47     3.16     3.70     4.32     6.18   575    1
phi                       88.30    0.02 1.68    85.12    87.14    88.28    89.42    91.62  4519    1
r_Year[1960,Intercept]     0.10    0.00 0.03     0.05     0.08     0.10     0.12     0.16  1702    1
r_Year[1961,Intercept]     0.15    0.00 0.03     0.10     0.13     0.15     0.17     0.21  2013    1
r_Year[1962,Intercept]     0.18    0.00 0.03     0.13     0.16     0.18     0.20     0.23  1873    1
r_Year[1963,Intercept]     0.15    0.00 0.03     0.10     0.13     0.15     0.17     0.21  1664    1
r_Year[1964,Intercept]     0.16    0.00 0.03     0.11     0.15     0.16     0.18     0.21  2190    1
r_Year[1965,Intercept]     0.15    0.00 0.03     0.10     0.14     0.15     0.17     0.21  2026    1
r_Year[1966,Intercept]     0.09    0.00 0.03     0.03     0.07     0.09     0.11     0.14  1549    1
r_Year[1967,Intercept]     0.10    0.00 0.03     0.05     0.09     0.10     0.12     0.16  1867    1
r_Year[1968,Intercept]     0.08    0.00 0.03     0.03     0.06     0.08     0.10     0.13  1810    1
r_Year[1969,Intercept]    -0.02    0.00 0.03    -0.08    -0.04    -0.02     0.00     0.03  1504    1
r_Year[1970,Intercept]    -0.12    0.00 0.03    -0.18    -0.14    -0.12    -0.10    -0.06  1419    1
r_Year[1971,Intercept]    -0.08    0.00 0.03    -0.14    -0.10    -0.08    -0.06    -0.03  1462    1
r_Year[1972,Intercept]    -0.12    0.00 0.03    -0.18    -0.14    -0.12    -0.10    -0.07  1574    1
r_Year[1973,Intercept]    -0.10    0.00 0.03    -0.15    -0.12    -0.10    -0.08    -0.05  1573    1
r_Year[1974,Intercept]    -0.05    0.00 0.03    -0.11    -0.07    -0.05    -0.03     0.00  1467    1
r_Year[1975,Intercept]    -0.07    0.00 0.03    -0.12    -0.09    -0.07    -0.05    -0.02  1269    1
r_Year[1976,Intercept]    -0.06    0.00 0.03    -0.12    -0.08    -0.06    -0.04    -0.01  1728    1
r_Year[1977,Intercept]    -0.04    0.00 0.03    -0.09    -0.06    -0.04    -0.02     0.01  1575    1
r_Year[1978,Intercept]     0.02    0.00 0.03    -0.03     0.00     0.02     0.04     0.07  1692    1
r_Year[1979,Intercept]    -0.02    0.00 0.03    -0.07    -0.04    -0.02     0.00     0.04  1473    1
r_Year[1980,Intercept]    -0.05    0.00 0.03    -0.10    -0.07    -0.05    -0.03     0.00  2049    1
r_Year[1981,Intercept]    -0.04    0.00 0.03    -0.09    -0.06    -0.04    -0.03     0.01  1738    1
r_Year[1982,Intercept]    -0.02    0.00 0.03    -0.07    -0.04    -0.02     0.00     0.03  1883    1
r_Year[1983,Intercept]     0.01    0.00 0.03    -0.04     0.00     0.01     0.03     0.06  1749    1
r_Year[1984,Intercept]     0.02    0.00 0.03    -0.03     0.00     0.02     0.03     0.07  1950    1
r_Year[1985,Intercept]    -0.04    0.00 0.03    -0.09    -0.05    -0.04    -0.02     0.01  1983    1
r_Year[1986,Intercept]    -0.06    0.00 0.03    -0.11    -0.08    -0.06    -0.05    -0.01  2181    1
r_Year[1987,Intercept]    -0.05    0.00 0.03    -0.10    -0.06    -0.05    -0.03     0.01  2129    1
r_Year[1988,Intercept]    -0.09    0.00 0.03    -0.14    -0.11    -0.09    -0.08    -0.04  2178    1
r_Year[1989,Intercept]    -0.11    0.00 0.03    -0.16    -0.13    -0.11    -0.09    -0.06  2031    1
r_Year[1990,Intercept]    -0.07    0.00 0.03    -0.12    -0.09    -0.07    -0.05    -0.02  2626    1
r_Year[1991,Intercept]    -0.07    0.00 0.03    -0.12    -0.09    -0.07    -0.05    -0.02  2193    1
r_Year[1992,Intercept]    -0.06    0.00 0.03    -0.12    -0.08    -0.06    -0.04    -0.01  1798    1
r_Year[1993,Intercept]     0.04    0.00 0.03    -0.02     0.02     0.04     0.05     0.09  2531    1
r_Year[1994,Intercept]     0.01    0.00 0.03    -0.04    -0.01     0.01     0.03     0.06  2425    1
r_Year[1995,Intercept]     0.04    0.00 0.03    -0.01     0.03     0.04     0.06     0.10  1898    1
r_Year[1996,Intercept]     0.01    0.00 0.03    -0.04     0.00     0.01     0.03     0.07  2102    1
r_Year[1997,Intercept]     0.02    0.00 0.03    -0.03     0.01     0.02     0.04     0.08  2179    1
r_Year[1998,Intercept]     0.05    0.00 0.03     0.00     0.03     0.05     0.07     0.11  2621    1
r_Year[1999,Intercept]     0.07    0.00 0.03     0.02     0.05     0.07     0.09     0.13  2054    1
r_Year[2000,Intercept]     0.02    0.00 0.03    -0.03     0.00     0.02     0.04     0.08  2050    1
r_Year[2001,Intercept]     0.01    0.00 0.03    -0.04     0.00     0.01     0.03     0.07  2213    1
r_Year[2002,Intercept]     0.05    0.00 0.03    -0.01     0.03     0.05     0.07     0.11  1926    1
r_Year[2003,Intercept]    -0.09    0.00 0.03    -0.15    -0.11    -0.09    -0.07    -0.04  1977    1
r_Year[2004,Intercept]    -0.05    0.00 0.03    -0.11    -0.07    -0.05    -0.03     0.00  2106    1
r_Year[2005,Intercept]    -0.04    0.00 0.03    -0.10    -0.06    -0.04    -0.02     0.02  1680    1
r_Year[2006,Intercept]    -0.04    0.00 0.03    -0.10    -0.06    -0.04    -0.02     0.02  1925    1
r_Year[2007,Intercept]    -0.03    0.00 0.03    -0.08    -0.05    -0.03     0.00     0.03  1948    1
r_Year[2008,Intercept]    -0.06    0.00 0.03    -0.12    -0.08    -0.06    -0.04     0.00  1626    1
r_Year[2009,Intercept]    -0.06    0.00 0.03    -0.13    -0.08    -0.06    -0.04     0.00  1836    1
r_Year[2010,Intercept]    -0.02    0.00 0.03    -0.09    -0.04    -0.02     0.00     0.04  1790    1
r_Year[2011,Intercept]     0.00    0.00 0.03    -0.07    -0.03     0.00     0.02     0.06  1605    1
r_Year[2012,Intercept]     0.03    0.00 0.03    -0.04     0.00     0.03     0.05     0.09  1651    1
r_Year[2013,Intercept]    -0.02    0.00 0.04    -0.09    -0.05    -0.02     0.00     0.05  1475    1
r_Year[2014,Intercept]     0.02    0.00 0.04    -0.05     0.00     0.02     0.05     0.09  1530    1
r_Year[2015,Intercept]     0.07    0.00 0.03     0.01     0.05     0.07     0.10     0.15  1419    1
r_Year[2016,Intercept]     0.02    0.00 0.04    -0.05     0.00     0.02     0.05     0.09  1519    1
r_Year[2017,Intercept]     0.05    0.00 0.04    -0.03     0.02     0.05     0.07     0.12  1400    1
s_sAge_1[1]               -2.10    0.01 0.56    -3.18    -2.49    -2.09    -1.72    -1.01  4492    1
s_sAge_1[2]                7.37    0.00 0.22     6.95     7.23     7.37     7.52     7.80  4010    1
s_sAge_1[3]                1.57    0.00 0.11     1.36     1.49     1.56     1.64     1.78  3160    1
s_sAge_1[4]                4.24    0.00 0.09     4.07     4.18     4.24     4.30     4.41  3572    1
s_sAge_1[5]                1.79    0.00 0.26     1.29     1.61     1.78     1.96     2.29  3771    1
s_sAge_1[6]                4.48    0.00 0.17     4.14     4.36     4.48     4.58     4.80  3929    1
s_sAge_1[7]               -3.96    0.01 0.45    -4.87    -4.26    -3.95    -3.66    -3.09  4038    1
s_sAge_1[8]               -0.37    0.01 0.32    -1.01    -0.59    -0.37    -0.16     0.26  3652    1
lp__                   10389.20    0.29 8.19 10372.82 10383.65 10389.65 10394.86 10404.54   783    1
``````

The dataset is:
dati.csv (146.7 KB)

The Environment is:
risultati_modello_CVD_Beta.RData (2.4 MB)

Thanks in advance for the help.

Operating System: macOS Big Sur11.6.4
brms Version: 2.16.3

Thanks in advance for the help.
If you have any doubts ask me

Hi @David97 ,
You asked a very vague question that makes it hard to help you as you give no indication of what you are struggling with specifically.
If the answer to that question is something along the lines of “everything”, than a general introduction to Bayesian statistics such as Statistical Rethinking by Richard McElreath might serve you better than a quick answer on this forum as you might lack too much fundamental knowledge for it to be useful.

If there are specific parts of this model that you struggle to understand please tell us what you tried to understand it as it might help use to point you towards something that suits you better.

Hello,
first, I don’t understand the output of model\$fit: what coefficients are s_sAge_1[1] or lp_?
Secondly I don’t understand the output of model\$prior for example the sixth line :

``````student_t(3, 0, 2.5) sd                             default
``````

So first off, you might want to look at the `summary` instead of `model\$fit` as it gives a little more guidance.

first, I don’t understand the output of model\$fit: what coefficients are s_sAge_1[1] or lp_?

The `s()` denotes a smooth or spline as a function of age. McElreath talks about them in his lecture and in the book.
Here is a blog post that talks about splines in brms.
I am sure BDA also discusses it but I leave the search up to you.

Secondly I don’t understand the output of model\$prior for example the sixth line :

``````student_t(3, 0, 2.5) sd      default
``````

That question again is so general, that I would point you towards an introduction to priors and maybe something about multilevel models

I can imagine that you might prefer simple explanations here but the way you state your questions gives me the feeling of handing over your homework to this forum and I’d rather have you learn how to answer those questions yourself in the future.