Estimates reference level of a factor in complex group-level random effects model sd(reflevel)

When modeling with a complex group-level effects structure, brms estimates sd(reflevel) of the factor.
ex. The unordered factor g_noise has 2 levels: 1 and 38.
A model with y ~+ (1 + g_size * g_noise * g_shape * g_interps || g_rep) works as expected. We only see an sd(g_noise38):

 brms_20red2_gamma_mdl1_5
 Family: gamma 
  Links: mu = log; shape = identity 
Formula: y ~ g_size * g_noise * g_shape * g_interps + (1 + g_size * g_noise * g_shape * g_interps || g_rep) 
   Data: t_long_CNSubset20red2_sub3_unord (Number of observations: 1440) 
Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup samples = 4000

Group-Level Effects: 
~g_rep (Number of levels: 20) 
                                               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept)                                      0.04      0.01     0.03     0.06 1.01      986     1640
sd(g_size11)                                       0.00      0.00     0.00     0.00 1.00     1531     1931
sd(g_noise38)                                      0.35      0.06     0.26     0.49 1.00     1291     1290
sd(g_shape1)                                       0.00      0.00     0.00     0.01 1.00     1369     1498
sd(g_interpsEM001)                                 0.01      0.00     0.00     0.01 1.00     1863     2579
sd(g_interpsEM003)                                 0.03      0.01     0.02     0.04 1.00     1835     2283
sd(g_interpsEM006)                                 0.00      0.00     0.00     0.01 1.01      775     1668
sd(g_interpsEM008)                                 0.00      0.00     0.00     0.01 1.00      868     1383
sd(g_interpsEM016)                                 0.00      0.00     0.00     0.01 1.01      688     1479
sd(g_interpsEM018)                                 0.00      0.00     0.00     0.01 1.01      604      825
sd(g_interpsEM026)                                 0.00      0.00     0.00     0.01 1.00      985     1459
sd(g_interpsEM028)                                 0.03      0.01     0.02     0.04 1.00     1401     1675
sd(g_size11:g_noise38)                             0.58      0.10     0.43     0.81 1.00     1505     2088
sd(g_size11:g_shape1)                              0.00      0.00     0.00     0.01 1.00     1273     1826
sd(g_noise38:g_shape1)                             0.35      0.06     0.26     0.49 1.00     1507     1867
sd(g_size11:g_interpsEM001)                        0.00      0.00     0.00     0.01 1.00     2051     2279
sd(g_size11:g_interpsEM003)                        0.02      0.00     0.01     0.03 1.00     2207     2852
sd(g_size11:g_interpsEM006)                        0.00      0.00     0.00     0.01 1.00     1832     1878
sd(g_size11:g_interpsEM008)                        0.00      0.00     0.00     0.01 1.00     2100     2715
sd(g_size11:g_interpsEM016)                        0.00      0.00     0.00     0.01 1.00     1726     2074
sd(g_size11:g_interpsEM018)                        0.00      0.00     0.00     0.00 1.00     2504     2691
sd(g_size11:g_interpsEM026)                        0.00      0.00     0.00     0.01 1.00     2749     2222
sd(g_size11:g_interpsEM028)                        0.01      0.00     0.00     0.01 1.00     1119     1379
sd(g_noise38:g_interpsEM001)                       0.27      0.05     0.20     0.37 1.00     1519     2044
sd(g_noise38:g_interpsEM003)                       0.26      0.05     0.19     0.37 1.00     1693     1986
sd(g_noise38:g_interpsEM006)                       0.00      0.00     0.00     0.00 1.00     2671     2433
sd(g_noise38:g_interpsEM008)                       0.00      0.00     0.00     0.00 1.00     2400     2120
sd(g_noise38:g_interpsEM016)                       0.00      0.00     0.00     0.00 1.00     2305     2491
sd(g_noise38:g_interpsEM018)                       0.00      0.00     0.00     0.01 1.00     1871     1870
sd(g_noise38:g_interpsEM026)                       0.27      0.05     0.20     0.38 1.00     1503     1758
sd(g_noise38:g_interpsEM028)                       0.27      0.05     0.19     0.37 1.00     1508     2035
sd(g_shape1:g_interpsEM001)                        0.00      0.00     0.00     0.01 1.00     2669     2272
sd(g_shape1:g_interpsEM003)                        0.01      0.00     0.01     0.02 1.00     1503     2165
sd(g_shape1:g_interpsEM006)                        0.00      0.00     0.00     0.00 1.00     2320     2161
sd(g_shape1:g_interpsEM008)                        0.00      0.00     0.00     0.00 1.00     2525     2438
sd(g_shape1:g_interpsEM016)                        0.00      0.00     0.00     0.00 1.00     2557     2090
sd(g_shape1:g_interpsEM018)                        0.00      0.00     0.00     0.00 1.00     2490     2586
sd(g_shape1:g_interpsEM026)                        0.00      0.00     0.00     0.01 1.00     2470     2470
sd(g_shape1:g_interpsEM028)                        0.00      0.00     0.00     0.01 1.00     2336     2565
sd(g_size11:g_noise38:g_shape1)                    0.55      0.09     0.40     0.76 1.00     1450     1888
sd(g_size11:g_noise38:g_interpsEM001)              0.56      0.09     0.42     0.76 1.00     1811     2728
sd(g_size11:g_noise38:g_interpsEM003)              0.57      0.09     0.42     0.78 1.00     1699     1657
sd(g_size11:g_noise38:g_interpsEM006)              0.00      0.00     0.00     0.00 1.00     2705     2275
sd(g_size11:g_noise38:g_interpsEM008)              0.00      0.00     0.00     0.01 1.00     2756     2276
sd(g_size11:g_noise38:g_interpsEM016)              0.00      0.00     0.00     0.00 1.00     2999     2205
sd(g_size11:g_noise38:g_interpsEM018)              0.00      0.00     0.00     0.01 1.00     2998     2657
sd(g_size11:g_noise38:g_interpsEM026)              0.56      0.09     0.42     0.76 1.00     1829     2306
sd(g_size11:g_noise38:g_interpsEM028)              0.57      0.09     0.42     0.78 1.00     1666     2132
sd(g_size11:g_shape1:g_interpsEM001)               0.00      0.00     0.00     0.01 1.00     3187     2413
sd(g_size11:g_shape1:g_interpsEM003)               0.00      0.00     0.00     0.01 1.00     1615     2463
sd(g_size11:g_shape1:g_interpsEM006)               0.00      0.00     0.00     0.01 1.00     2519     2290
sd(g_size11:g_shape1:g_interpsEM008)               0.00      0.00     0.00     0.01 1.00     2569     2264
sd(g_size11:g_shape1:g_interpsEM016)               0.00      0.00     0.00     0.01 1.00     1983     1905
sd(g_size11:g_shape1:g_interpsEM018)               0.00      0.00     0.00     0.01 1.00     2412     1567
sd(g_size11:g_shape1:g_interpsEM026)               0.00      0.00     0.00     0.01 1.00     3060     2546
sd(g_size11:g_shape1:g_interpsEM028)               0.00      0.00     0.00     0.01 1.00     2908     2359
sd(g_noise38:g_shape1:g_interpsEM001)              0.33      0.06     0.25     0.47 1.00     1261     1946
sd(g_noise38:g_shape1:g_interpsEM003)              0.34      0.06     0.25     0.47 1.00     1682     1989
sd(g_noise38:g_shape1:g_interpsEM006)              0.00      0.00     0.00     0.00 1.00     2744     2325
sd(g_noise38:g_shape1:g_interpsEM008)              0.00      0.00     0.00     0.00 1.00     3074     2066
sd(g_noise38:g_shape1:g_interpsEM016)              0.00      0.00     0.00     0.00 1.00     3410     2467
sd(g_noise38:g_shape1:g_interpsEM018)              0.00      0.00     0.00     0.01 1.00     2755     2329
sd(g_noise38:g_shape1:g_interpsEM026)              0.34      0.06     0.25     0.46 1.00     1445     2065
sd(g_noise38:g_shape1:g_interpsEM028)              0.34      0.06     0.25     0.47 1.00     1667     1999
sd(g_size11:g_noise38:g_shape1:g_interpsEM001)     0.53      0.09     0.40     0.73 1.00     1768     2251
sd(g_size11:g_noise38:g_shape1:g_interpsEM003)     0.54      0.09     0.40     0.74 1.00     1914     1926
sd(g_size11:g_noise38:g_shape1:g_interpsEM006)     0.00      0.00     0.00     0.01 1.00     2848     2137
sd(g_size11:g_noise38:g_shape1:g_interpsEM008)     0.00      0.00     0.00     0.01 1.00     2899     2226
sd(g_size11:g_noise38:g_shape1:g_interpsEM016)     0.00      0.00     0.00     0.01 1.00     2977     2018
sd(g_size11:g_noise38:g_shape1:g_interpsEM018)     0.00      0.00     0.00     0.01 1.00     3125     2563
sd(g_size11:g_noise38:g_shape1:g_interpsEM026)     0.53      0.09     0.39     0.74 1.00     1896     2037
sd(g_size11:g_noise38:g_shape1:g_interpsEM028)     0.53      0.09     0.39     0.72 1.00     1868     1809

Population-Level Effects: 
                                           Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept                                      5.29      0.01     5.27     5.31 1.00     1025     1555
g_size11                                       3.78      0.00     3.77     3.79 1.00     1307     1868
g_noise38                                      0.61      0.08     0.46     0.76 1.01      620     1223
g_shape1                                      -0.01      0.00    -0.01     0.00 1.00     1403     2258
g_interpsEM001                                -0.34      0.00    -0.35    -0.34 1.00     2258     2725
g_interpsEM003                                -0.70      0.01    -0.72    -0.69 1.00     1420     1845
g_interpsEM006                                -0.27      0.00    -0.27    -0.26 1.00     1910     2388
g_interpsEM008                                -0.35      0.00    -0.36    -0.35 1.00     2243     2775
g_interpsEM016                                -0.27      0.00    -0.27    -0.26 1.00     2097     2809
g_interpsEM018                                -0.35      0.00    -0.36    -0.35 1.00     2120     2311
g_interpsEM026                                -0.35      0.00    -0.36    -0.35 1.00     2569     2965
g_interpsEM028                                -0.72      0.01    -0.74    -0.71 1.00     1271     1845
g_size11:g_noise38                            -0.79      0.14    -1.08    -0.53 1.00      549     1049
g_size11:g_shape1                              0.00      0.00    -0.00     0.01 1.00     1209     1788
g_noise38:g_shape1                            -0.32      0.08    -0.49    -0.17 1.01      572     1166
g_size11:g_interpsEM001                       -0.00      0.00    -0.01     0.00 1.00     1959     2463
g_size11:g_interpsEM003                       -0.03      0.01    -0.05    -0.02 1.00     2427     2665
g_size11:g_interpsEM006                       -0.00      0.00    -0.01     0.00 1.00     1677     2205
g_size11:g_interpsEM008                       -0.01      0.00    -0.02    -0.00 1.00     1859     2594
g_size11:g_interpsEM016                       -0.00      0.00    -0.01     0.00 1.00     1754     2603
g_size11:g_interpsEM018                       -0.01      0.00    -0.02    -0.00 1.00     1658     2246
g_size11:g_interpsEM026                       -0.00      0.00    -0.01     0.00 1.00     2131     2534
g_size11:g_interpsEM028                       -0.03      0.00    -0.04    -0.02 1.00     2072     2768
g_noise38:g_interpsEM001                       0.67      0.06     0.55     0.80 1.00      718      948
g_noise38:g_interpsEM003                       1.06      0.06     0.95     1.17 1.01      678     1288
g_noise38:g_interpsEM006                       0.27      0.00     0.26     0.28 1.00     2004     2573
g_noise38:g_interpsEM008                       0.35      0.00     0.34     0.36 1.00     2457     2993
g_noise38:g_interpsEM016                       0.27      0.00     0.26     0.28 1.00     2292     2343
g_noise38:g_interpsEM018                       0.35      0.00     0.35     0.36 1.00     2190     2525
g_noise38:g_interpsEM026                       0.68      0.06     0.56     0.80 1.01      604     1021
g_noise38:g_interpsEM028                       1.08      0.06     0.96     1.20 1.00      724     1148
g_shape1:g_interpsEM001                       -0.00      0.00    -0.01     0.01 1.00     2144     2687
g_shape1:g_interpsEM003                       -0.03      0.00    -0.03    -0.02 1.00     2376     3000
g_shape1:g_interpsEM006                       -0.00      0.00    -0.01     0.00 1.00     1894     2511
g_shape1:g_interpsEM008                       -0.01      0.00    -0.01     0.00 1.00     1985     3013
g_shape1:g_interpsEM016                       -0.00      0.00    -0.01     0.00 1.00     1843     2760
g_shape1:g_interpsEM018                       -0.00      0.00    -0.01     0.00 1.00     1916     2451
g_shape1:g_interpsEM026                       -0.00      0.00    -0.01     0.01 1.00     2226     2432
g_shape1:g_interpsEM028                       -0.03      0.00    -0.04    -0.02 1.00     2039     2806
g_size11:g_noise38:g_shape1                    0.35      0.12     0.11     0.58 1.00      744     1251
g_size11:g_noise38:g_interpsEM001             -0.54      0.13    -0.78    -0.27 1.01      752     1347
g_size11:g_noise38:g_interpsEM003             -0.57      0.13    -0.81    -0.31 1.00      758      863
g_size11:g_noise38:g_interpsEM006              0.00      0.01    -0.01     0.01 1.00     1935     2633
g_size11:g_noise38:g_interpsEM008              0.01      0.01     0.00     0.02 1.00     2054     2489
g_size11:g_noise38:g_interpsEM016              0.00      0.01    -0.01     0.01 1.00     2028     2604
g_size11:g_noise38:g_interpsEM018              0.01      0.01    -0.00     0.02 1.00     1902     2117
g_size11:g_noise38:g_interpsEM026             -0.55      0.13    -0.80    -0.29 1.00      683     1003
g_size11:g_noise38:g_interpsEM028             -0.56      0.13    -0.82    -0.30 1.00      881     1306
g_size11:g_shape1:g_interpsEM001               0.00      0.01    -0.01     0.01 1.00     1856     2570
g_size11:g_shape1:g_interpsEM003               0.03      0.01     0.02     0.04 1.00     1948     2489
g_size11:g_shape1:g_interpsEM006               0.00      0.01    -0.01     0.02 1.00     1621     2502
g_size11:g_shape1:g_interpsEM008               0.01      0.01    -0.00     0.02 1.00     1646     2447
g_size11:g_shape1:g_interpsEM016               0.00      0.01    -0.01     0.02 1.00     1562     2053
g_size11:g_shape1:g_interpsEM018               0.01      0.01    -0.00     0.02 1.00     1506     1872
g_size11:g_shape1:g_interpsEM026               0.00      0.01    -0.01     0.01 1.00     1920     2670
g_size11:g_shape1:g_interpsEM028               0.03      0.01     0.02     0.04 1.00     1891     2881
g_noise38:g_shape1:g_interpsEM001             -0.03      0.08    -0.18     0.12 1.01      773     1430
g_noise38:g_shape1:g_interpsEM003              0.01      0.08    -0.14     0.17 1.00      711     1066
g_noise38:g_shape1:g_interpsEM006              0.00      0.01    -0.01     0.01 1.00     1998     2311
g_noise38:g_shape1:g_interpsEM008              0.01      0.01    -0.00     0.02 1.00     2188     3081
g_noise38:g_shape1:g_interpsEM016              0.00      0.01    -0.01     0.01 1.00     2137     2564
g_noise38:g_shape1:g_interpsEM018              0.01      0.01    -0.01     0.02 1.00     2033     2685
g_noise38:g_shape1:g_interpsEM026             -0.02      0.08    -0.17     0.13 1.00      741     1365
g_noise38:g_shape1:g_interpsEM028              0.01      0.08    -0.14     0.16 1.01      834     1227
g_size11:g_noise38:g_shape1:g_interpsEM001    -0.04      0.12    -0.27     0.20 1.00      720      737
g_size11:g_noise38:g_shape1:g_interpsEM003    -0.07      0.12    -0.31     0.17 1.01      838     1260
g_size11:g_noise38:g_shape1:g_interpsEM006    -0.00      0.01    -0.02     0.01 1.00     1812     2474
g_size11:g_noise38:g_shape1:g_interpsEM008    -0.01      0.01    -0.02     0.01 1.00     1796     2210
g_size11:g_noise38:g_shape1:g_interpsEM016    -0.01      0.01    -0.02     0.01 1.00     1735     2477
g_size11:g_noise38:g_shape1:g_interpsEM018    -0.01      0.01    -0.02     0.01 1.00     1738     2161
g_size11:g_noise38:g_shape1:g_interpsEM026    -0.04      0.12    -0.28     0.20 1.00      755     1229
g_size11:g_noise38:g_shape1:g_interpsEM028    -0.08      0.12    -0.32     0.15 1.00      820     1313

Family Specific Parameters: 
      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
shape 13349.76    810.97 11804.76 15001.82 1.01      836     2176

Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
1 Like

But y ~+ (1 + g_size * g_noise * g_shape * g_interps - g_size * g_shape * g_interps || g_rep) does not. Notice, that now there is a sd(g_noise1) .

brms_20red2_gamma_mdl1_10
 Family: gamma 
  Links: mu = log; shape = identity 
Formula: y ~ g_size * g_noise * g_shape * g_interps + (1 + g_size * g_noise * g_shape * g_interps - g_size * g_shape * g_interps || g_rep) 
   Data: t_long_CNSubset20red2_sub3_unord (Number of observations: 1440) 
Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1;
         total post-warmup samples = 4000

Group-Level Effects: 
~g_rep (Number of levels: 20) 
                                               Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept)                                      0.04      0.01     0.03     0.05 1.00      932     1395
sd(g_noise38)                                      0.35      0.06     0.25     0.48 1.01      778     1729
sd(g_noise1:g_size11)                              0.00      0.00     0.00     0.01 1.00     1296     1284
sd(g_noise38:g_size11)                             0.58      0.10     0.43     0.80 1.00     1136     1741
sd(g_noise1:g_shape1)                              0.00      0.00     0.00     0.01 1.00     1692     2391
sd(g_noise38:g_shape1)                             0.35      0.06     0.26     0.49 1.00      932     1494
sd(g_noise1:g_interpsEM001)                        0.01      0.00     0.01     0.02 1.00     1499     2892
sd(g_noise38:g_interpsEM001)                       0.27      0.05     0.20     0.37 1.00     1115     1874
sd(g_noise1:g_interpsEM003)                        0.03      0.01     0.02     0.05 1.01     1426     2172
sd(g_noise38:g_interpsEM003)                       0.27      0.05     0.20     0.37 1.00      939     1645
sd(g_noise1:g_interpsEM006)                        0.02      0.00     0.01     0.02 1.00     1254     2065
sd(g_noise38:g_interpsEM006)                       0.00      0.00     0.00     0.00 1.00     3782     2537
sd(g_noise1:g_interpsEM008)                        0.02      0.00     0.01     0.02 1.00     1201     2178
sd(g_noise38:g_interpsEM008)                       0.00      0.00     0.00     0.00 1.00     3430     2010
sd(g_noise1:g_interpsEM016)                        0.02      0.00     0.01     0.02 1.00     1224     2287
sd(g_noise38:g_interpsEM016)                       0.00      0.00     0.00     0.00 1.00     3447     2081
sd(g_noise1:g_interpsEM018)                        0.02      0.00     0.01     0.02 1.00     1219     2072
sd(g_noise38:g_interpsEM018)                       0.00      0.00     0.00     0.00 1.00     2950     1930
sd(g_noise1:g_interpsEM026)                        0.01      0.00     0.01     0.02 1.01     1322     2151
sd(g_noise38:g_interpsEM026)                       0.27      0.05     0.20     0.38 1.00      834     1579
sd(g_noise1:g_interpsEM028)                        0.03      0.01     0.02     0.05 1.00     1052     1664
sd(g_noise38:g_interpsEM028)                       0.28      0.05     0.20     0.38 1.01     1110     1828
sd(g_noise1:g_size11:g_shape1)                     0.01      0.00     0.00     0.01 1.00     1504     1935
sd(g_noise38:g_size11:g_shape1)                    0.55      0.09     0.41     0.76 1.00     1039     1772
sd(g_noise1:g_size11:g_interpsEM001)               0.00      0.00     0.00     0.01 1.00     1639     2149
sd(g_noise38:g_size11:g_interpsEM001)              0.56      0.09     0.41     0.79 1.00     1108     1630
sd(g_noise1:g_size11:g_interpsEM003)               0.02      0.00     0.02     0.03 1.00     1379     2294
sd(g_noise38:g_size11:g_interpsEM003)              0.56      0.09     0.42     0.76 1.00      867     1169
sd(g_noise1:g_size11:g_interpsEM006)               0.00      0.00     0.00     0.01 1.00     2351     2251
sd(g_noise38:g_size11:g_interpsEM006)              0.00      0.00     0.00     0.00 1.00     3517     2311
sd(g_noise1:g_size11:g_interpsEM008)               0.00      0.00     0.00     0.01 1.00     2897     2406
sd(g_noise38:g_size11:g_interpsEM008)              0.00      0.00     0.00     0.00 1.00     3320     1813
sd(g_noise1:g_size11:g_interpsEM016)               0.00      0.00     0.00     0.01 1.00     2468     2597
sd(g_noise38:g_size11:g_interpsEM016)              0.00      0.00     0.00     0.00 1.00     3716     2290
sd(g_noise1:g_size11:g_interpsEM018)               0.00      0.00     0.00     0.00 1.00     2493     2358
sd(g_noise38:g_size11:g_interpsEM018)              0.00      0.00     0.00     0.00 1.00     3132     2168
sd(g_noise1:g_size11:g_interpsEM026)               0.00      0.00     0.00     0.00 1.00     2692     2401
sd(g_noise38:g_size11:g_interpsEM026)              0.56      0.09     0.41     0.77 1.01      857     1322
sd(g_noise1:g_size11:g_interpsEM028)               0.01      0.00     0.00     0.02 1.00     1685     1404
sd(g_noise38:g_size11:g_interpsEM028)              0.57      0.09     0.43     0.77 1.00      978     1557
sd(g_noise1:g_shape1:g_interpsEM001)               0.00      0.00     0.00     0.01 1.00     2636     2424
sd(g_noise38:g_shape1:g_interpsEM001)              0.34      0.06     0.25     0.47 1.00     1137     1555
sd(g_noise1:g_shape1:g_interpsEM003)               0.02      0.00     0.01     0.03 1.00      980     1217
sd(g_noise38:g_shape1:g_interpsEM003)              0.34      0.06     0.25     0.48 1.00      990     1695
sd(g_noise1:g_shape1:g_interpsEM006)               0.00      0.00     0.00     0.00 1.00     3025     2024
sd(g_noise38:g_shape1:g_interpsEM006)              0.00      0.00     0.00     0.00 1.00     3446     1755
sd(g_noise1:g_shape1:g_interpsEM008)               0.00      0.00     0.00     0.00 1.00     2321     1934
sd(g_noise38:g_shape1:g_interpsEM008)              0.00      0.00     0.00     0.00 1.00     3728     2086
sd(g_noise1:g_shape1:g_interpsEM016)               0.00      0.00     0.00     0.01 1.00     2842     2493
sd(g_noise38:g_shape1:g_interpsEM016)              0.00      0.00     0.00     0.00 1.00     3535     1908
sd(g_noise1:g_shape1:g_interpsEM018)               0.00      0.00     0.00     0.00 1.00     2747     1963
sd(g_noise38:g_shape1:g_interpsEM018)              0.00      0.00     0.00     0.00 1.00     3031     1986
sd(g_noise1:g_shape1:g_interpsEM026)               0.00      0.00     0.00     0.00 1.00     3125     2066
sd(g_noise38:g_shape1:g_interpsEM026)              0.34      0.05     0.25     0.46 1.00      863     1854
sd(g_noise1:g_shape1:g_interpsEM028)               0.00      0.00     0.00     0.01 1.00     1481     1753
sd(g_noise38:g_shape1:g_interpsEM028)              0.34      0.06     0.25     0.47 1.00     1127     1751
sd(g_noise1:g_size11:g_shape1:g_interpsEM001)      0.00      0.00     0.00     0.01 1.00     2669     2178
sd(g_noise38:g_size11:g_shape1:g_interpsEM001)     0.53      0.09     0.39     0.75 1.00     1208     2109
sd(g_noise1:g_size11:g_shape1:g_interpsEM003)      0.01      0.01     0.00     0.03 1.00      613      472
sd(g_noise38:g_size11:g_shape1:g_interpsEM003)     0.54      0.09     0.40     0.74 1.00     1225     2036
sd(g_noise1:g_size11:g_shape1:g_interpsEM006)      0.00      0.00     0.00     0.01 1.00     1836     1735
sd(g_noise38:g_size11:g_shape1:g_interpsEM006)     0.00      0.00     0.00     0.00 1.00     3461     2066
sd(g_noise1:g_size11:g_shape1:g_interpsEM008)      0.00      0.00     0.00     0.01 1.00     2608     2130
sd(g_noise38:g_size11:g_shape1:g_interpsEM008)     0.00      0.00     0.00     0.00 1.00     3336     1906
sd(g_noise1:g_size11:g_shape1:g_interpsEM016)      0.00      0.00     0.00     0.01 1.00     2782     2395
sd(g_noise38:g_size11:g_shape1:g_interpsEM016)     0.00      0.00     0.00     0.00 1.00     3783     2140
sd(g_noise1:g_size11:g_shape1:g_interpsEM018)      0.00      0.00     0.00     0.01 1.00     2775     2476
sd(g_noise38:g_size11:g_shape1:g_interpsEM018)     0.00      0.00     0.00     0.00 1.00     3592     2021
sd(g_noise1:g_size11:g_shape1:g_interpsEM026)      0.00      0.00     0.00     0.01 1.00     2842     2262
sd(g_noise38:g_size11:g_shape1:g_interpsEM026)     0.53      0.09     0.40     0.74 1.00     1032     1790
sd(g_noise1:g_size11:g_shape1:g_interpsEM028)      0.00      0.00     0.00     0.01 1.00     2684     2030
sd(g_noise38:g_size11:g_shape1:g_interpsEM028)     0.54      0.09     0.39     0.76 1.00     1140     1581

Population-Level Effects: 
                                           Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept                                      5.29      0.01     5.28     5.31 1.01      321      875
g_size11                                       3.78      0.00     3.78     3.79 1.00     1314     2085
g_noise38                                      0.60      0.08     0.44     0.75 1.01      376      904
g_shape1                                      -0.01      0.00    -0.01    -0.00 1.00     1360     2107
g_interpsEM001                                -0.34      0.00    -0.35    -0.33 1.00     1269     1854
g_interpsEM003                                -0.70      0.01    -0.72    -0.69 1.00      532     1574
g_interpsEM006                                -0.27      0.00    -0.28    -0.26 1.00      826     1647
g_interpsEM008                                -0.35      0.00    -0.36    -0.34 1.00      912     1827
g_interpsEM016                                -0.27      0.00    -0.28    -0.26 1.01      852     1739
g_interpsEM018                                -0.35      0.00    -0.36    -0.34 1.00      828     1322
g_interpsEM026                                -0.35      0.00    -0.36    -0.34 1.00     1505     2340
g_interpsEM028                                -0.72      0.01    -0.74    -0.71 1.01      629      937
g_size11:g_noise38                            -0.79      0.13    -1.05    -0.54 1.01      377      799
g_size11:g_shape1                              0.00      0.00    -0.00     0.01 1.00     1126     2033
g_noise38:g_shape1                            -0.31      0.08    -0.47    -0.15 1.01      306      617
g_size11:g_interpsEM001                       -0.00      0.00    -0.01     0.00 1.00     2009     2714
g_size11:g_interpsEM003                       -0.03      0.01    -0.05    -0.02 1.00     1257     1819
g_size11:g_interpsEM006                       -0.00      0.00    -0.01     0.00 1.00     1796     2528
g_size11:g_interpsEM008                       -0.01      0.00    -0.02    -0.01 1.00     1578     2507
g_size11:g_interpsEM016                       -0.00      0.00    -0.01     0.00 1.00     1611     3227
g_size11:g_interpsEM018                       -0.01      0.00    -0.02    -0.01 1.00     1602     2672
g_size11:g_interpsEM026                       -0.00      0.00    -0.01     0.00 1.00     1937     2614
g_size11:g_interpsEM028                       -0.03      0.00    -0.04    -0.03 1.00     2201     2667
g_noise38:g_interpsEM001                       0.67      0.06     0.56     0.79 1.01      408      792
g_noise38:g_interpsEM003                       1.06      0.06     0.94     1.18 1.01      404      861
g_noise38:g_interpsEM006                       0.27      0.00     0.26     0.28 1.00      907     1847
g_noise38:g_interpsEM008                       0.35      0.00     0.34     0.36 1.00     1014     1909
g_noise38:g_interpsEM016                       0.27      0.00     0.26     0.28 1.01     1022     2054
g_noise38:g_interpsEM018                       0.35      0.00     0.34     0.36 1.00      899     1519
g_noise38:g_interpsEM026                       0.68      0.06     0.56     0.80 1.01      265      569
g_noise38:g_interpsEM028                       1.09      0.06     0.96     1.21 1.00      427      725
g_shape1:g_interpsEM001                       -0.00      0.00    -0.01     0.01 1.00     1911     2642
g_shape1:g_interpsEM003                       -0.03      0.01    -0.04    -0.01 1.00     1427     2090
g_shape1:g_interpsEM006                       -0.00      0.00    -0.01     0.00 1.00     1648     2726
g_shape1:g_interpsEM008                       -0.01      0.00    -0.01     0.00 1.00     1587     2871
g_shape1:g_interpsEM016                       -0.00      0.00    -0.01     0.00 1.00     1682     2644
g_shape1:g_interpsEM018                       -0.00      0.00    -0.01     0.00 1.00     1595     2319
g_shape1:g_interpsEM026                       -0.00      0.00    -0.01     0.00 1.00     1982     2815
g_shape1:g_interpsEM028                       -0.03      0.00    -0.03    -0.02 1.00     1913     2775
g_size11:g_noise38:g_shape1                    0.33      0.13     0.08     0.58 1.02      321      708
g_size11:g_noise38:g_interpsEM001             -0.53      0.13    -0.80    -0.27 1.01      385      773
g_size11:g_noise38:g_interpsEM003             -0.56      0.12    -0.81    -0.33 1.01      321      784
g_size11:g_noise38:g_interpsEM006              0.00      0.00    -0.00     0.01 1.00     1711     2263
g_size11:g_noise38:g_interpsEM008              0.01      0.00     0.00     0.02 1.00     1683     2194
g_size11:g_noise38:g_interpsEM016              0.00      0.00    -0.00     0.01 1.00     1772     2827
g_size11:g_noise38:g_interpsEM018              0.01      0.00     0.00     0.02 1.00     1714     2599
g_size11:g_noise38:g_interpsEM026             -0.57      0.12    -0.81    -0.34 1.01      356      622
g_size11:g_noise38:g_interpsEM028             -0.56      0.13    -0.81    -0.30 1.01      323      630
g_size11:g_shape1:g_interpsEM001               0.00      0.00    -0.01     0.01 1.00     1515     2722
g_size11:g_shape1:g_interpsEM003               0.03      0.01     0.02     0.04 1.00     1913     2871
g_size11:g_shape1:g_interpsEM006               0.01      0.00    -0.00     0.01 1.00     1427     2534
g_size11:g_shape1:g_interpsEM008               0.01      0.00    -0.00     0.02 1.00     1333     2690
g_size11:g_shape1:g_interpsEM016               0.01      0.00    -0.00     0.01 1.00     1510     2335
g_size11:g_shape1:g_interpsEM018               0.01      0.00    -0.00     0.01 1.00     1407     2601
g_size11:g_shape1:g_interpsEM026               0.00      0.00    -0.01     0.01 1.00     1829     2371
g_size11:g_shape1:g_interpsEM028               0.03      0.00     0.02     0.04 1.00     1669     2218
g_noise38:g_shape1:g_interpsEM001             -0.03      0.08    -0.17     0.13 1.00      406      810
g_noise38:g_shape1:g_interpsEM003              0.01      0.08    -0.15     0.16 1.00      425      790
g_noise38:g_shape1:g_interpsEM006              0.00      0.00    -0.00     0.01 1.00     1891     2790
g_noise38:g_shape1:g_interpsEM008              0.01      0.00    -0.00     0.01 1.00     1874     3016
g_noise38:g_shape1:g_interpsEM016              0.00      0.00    -0.00     0.01 1.00     1798     2596
g_noise38:g_shape1:g_interpsEM018              0.01      0.00    -0.00     0.01 1.00     1664     2932
g_noise38:g_shape1:g_interpsEM026             -0.02      0.08    -0.17     0.14 1.01      406      747
g_noise38:g_shape1:g_interpsEM028              0.01      0.08    -0.13     0.17 1.01      449     1026
g_size11:g_noise38:g_shape1:g_interpsEM001    -0.05      0.12    -0.29     0.18 1.00      400      629
g_size11:g_noise38:g_shape1:g_interpsEM003    -0.07      0.12    -0.33     0.17 1.01      335      486
g_size11:g_noise38:g_shape1:g_interpsEM006    -0.01      0.01    -0.02     0.01 1.00     1492     2544
g_size11:g_noise38:g_shape1:g_interpsEM008    -0.01      0.01    -0.02     0.00 1.00     1511     2459
g_size11:g_noise38:g_shape1:g_interpsEM016    -0.01      0.01    -0.02     0.01 1.00     1617     2611
g_size11:g_noise38:g_shape1:g_interpsEM018    -0.01      0.01    -0.02     0.00 1.00     1466     2290
g_size11:g_noise38:g_shape1:g_interpsEM026    -0.05      0.12    -0.29     0.20 1.01      343      627
g_size11:g_noise38:g_shape1:g_interpsEM028    -0.06      0.12    -0.29     0.16 1.00      470      784

Family Specific Parameters: 
      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
shape 22090.14   1439.20 19376.57 24913.81 1.00      773     1672

Samples were drawn using sample(hmc). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).

Side question: is the estimate of shape valid, or would it indicated overparameterizaton? I was trying to reduce the number of group-effects by removing those estimated near zero to see if this would help with overparameterization as well as speed.

shape 13349.76    810.97 11804.76 15001.82 1.01      836     2176

I don’t see any sd(g_noise1) - there is only sd(g_noise1:some_other_predictor). And this seems to be the consequence of using the minus sign in the formula (I’ve never seen this use of formula before, so I don’t know what it is supposed to do). The behavior is completely in line with how such formulas work in base R, so I guess this is brms behaving as expected - my quick test:

data <- data.frame(g_noise = c("A", "B"), g_shape = c("C", "D"), 
                   g_interps = c("E", "F"))
colnames(model.matrix( ~ g_noise * g_shape * g_interps, data))

Gives

 "(Intercept)"                  "g_noiseB"                     "g_shapeD"
"g_interpsF"                  
 "g_noiseB:g_shapeD"            "g_noiseB:g_interpsF"          
"g_shapeD:g_interpsF"          "g_noiseB:g_shapeD:g_interpsF"

i.e. no “g_noiseA” terms as expected.

But when I use:

colnames(model.matrix( 
  ~  g_noise * g_shape * g_interps - g_shape * g_interps, 
data))

I get:

"(Intercept)"                  "g_noiseB"                     "g_noiseA:g_shapeD"
"g_noiseB:g_shapeD"           
"g_noiseA:g_interpsF"          "g_noiseB:g_interpsF"          
"g_noiseA:g_shapeD:g_interpsF" "g_noiseB:g_shapeD:g_interpsF"

So the same number of terms, but for some interactions, g_noiseA is treated as the reference category…

The model looks huge - unless you have a huuuuge amount of data, I don’t know how you could infer all of the coefficients. And the shape parameter indeed looks a bit fishy - in the gamma parametrization used by brms the variance is mu / shape, i.e. variance decreases with shape, so large shape compared to mu indicates the model believes there is little residual variance, which might indeed indicate overfitting (or other problems).

An addendum - I usually advice users to start with small models and only after they see a problem with the small model (e.g. by using some of the pp_check plots) to add additional covariates, random effects etc. Starting with such a large model is (at least for me) overwhelming and I am usually unable to debug anything about the large model.

Best of luck with your model!

1 Like