easystats / parameters

:bar_chart: Computation and processing of models' parameters
https://easystats.github.io/parameters/
GNU General Public License v3.0
438 stars 36 forks source link

add `effect` column for models with random effects #422

Closed IndrajeetPatil closed 3 years ago

IndrajeetPatil commented 3 years ago

To facilitate conversion from broom.mixed to parameters. Users expect such a column in the output dataframe.

library(lme4)
#> Loading required package: Matrix
library(magrittr)
library(parameters)

lmer_mod <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

broom.mixed::tidy(lmer_mod, effects = "fixed")
#> # A tibble: 2 x 5
#>   effect term        estimate std.error statistic
#>   <chr>  <chr>          <dbl>     <dbl>     <dbl>
#> 1 fixed  (Intercept)    251.       6.82     36.8 
#> 2 fixed  Days            10.5      1.55      6.77

parameters::standardize_names(parameters::model_parameters(lmer_mod), style = "broom") %>%
  tibble::as_tibble()
#> # A tibble: 2 x 9
#>   term  estimate std.error conf.level conf.low conf.high statistic df.error
#>   <chr>    <dbl>     <dbl>      <dbl>    <dbl>     <dbl>     <dbl>    <int>
#> 1 (Int…    251.       6.82       0.95   238.       265.      36.8       174
#> 2 Days      10.5      1.55       0.95     7.44      13.5      6.77      174
#> # … with 1 more variable: p.value <dbl>
strengejacke commented 3 years ago
library(lme4)
#> Loading required package: Matrix
library(parameters)
data(sleepstudy)
set.seed(12345)
sleepstudy$grp <- sample(1:5, size = 180, replace = TRUE)
sleepstudy$subgrp <- NA
for (i in 1:5) {
  filter_group <- sleepstudy$grp == i
  sleepstudy$subgrp[filter_group] <-
    sample(1:30, size = sum(filter_group), replace = TRUE)
}
model <- lmer(
  Reaction ~ Days + (1 | grp / subgrp) + (1 + Days | Subject),
  data = sleepstudy
)
#> boundary (singular) fit: see ?isSingular

model_parameters(model)
#> Parameter   | Coefficient |   SE |           95% CI | t(172) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78] |  36.84 | < .001
#> Days        |       10.47 | 1.55 | [  7.44,  13.50] |   6.77 | < .001

model_parameters(model, effects = "random")
#> # subgrp:grp
#> 
#> Parameter          | Coefficient |   SE |       95% CI
#> ------------------------------------------------------
#> (Intercept) [1:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [13:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [13:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [30:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [30:5] |        0.00 | 0.00 | [0.00, 0.00]
#> 
#> # Subject
#> 
#> Parameter         | Coefficient |    SE |           95% CI
#> ----------------------------------------------------------
#> (Intercept) [308] |        2.26 | 12.07 | [-21.40,  25.92]
#> (Intercept) [309] |      -40.40 | 12.07 | [-64.06, -16.74]
#> (Intercept) [310] |      -38.96 | 12.07 | [-62.62, -15.30]
#> (Intercept) [330] |       23.69 | 12.07 | [  0.03,  47.35]
#> (Intercept) [331] |       22.26 | 12.07 | [ -1.40,  45.92]
#> (Intercept) [332] |        9.04 | 12.07 | [-14.62,  32.70]
#> (Intercept) [333] |       16.84 | 12.07 | [ -6.82,  40.50]
#> (Intercept) [334] |       -7.23 | 12.07 | [-30.89,  16.43]
#> (Intercept) [335] |       -0.33 | 12.07 | [-23.99,  23.32]
#> (Intercept) [337] |       34.89 | 12.07 | [ 11.23,  58.55]
#> (Intercept) [349] |      -25.21 | 12.07 | [-48.87,  -1.55]
#> (Intercept) [350] |      -13.07 | 12.07 | [-36.73,  10.59]
#> (Intercept) [351] |        4.58 | 12.07 | [-19.08,  28.24]
#> (Intercept) [352] |       20.86 | 12.07 | [ -2.79,  44.52]
#> (Intercept) [369] |        3.28 | 12.07 | [-20.38,  26.93]
#> (Intercept) [370] |      -25.61 | 12.07 | [-49.27,  -1.95]
#> (Intercept) [371] |        0.81 | 12.07 | [-22.85,  24.47]
#> (Intercept) [372] |       12.31 | 12.07 | [-11.34,  35.97]
#> Days [308]        |        9.20 |  2.30 | [  4.68,  13.72]
#> Days [309]        |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Days [310]        |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Days [330]        |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Days [331]        |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Days [332]        |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Days [333]        |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Days [334]        |        1.07 |  2.30 | [ -3.44,   5.59]
#> Days [335]        |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Days [337]        |        8.63 |  2.30 | [  4.11,  13.15]
#> Days [349]        |        1.17 |  2.30 | [ -3.34,   5.69]
#> Days [350]        |        6.61 |  2.30 | [  2.10,  11.13]
#> Days [351]        |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Days [352]        |        3.54 |  2.30 | [ -0.98,   8.05]
#> Days [369]        |        0.87 |  2.30 | [ -3.65,   5.39]
#> Days [370]        |        4.82 |  2.30 | [  0.31,   9.34]
#> Days [371]        |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Days [372]        |        1.28 |  2.30 | [ -3.23,   5.80]
#> 
#> # grp
#> 
#> Parameter       | Coefficient |   SE |       95% CI
#> ---------------------------------------------------
#> (Intercept) [1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5] |        0.00 | 0.00 | [0.00, 0.00]

model_parameters(model, effects = "random_variance")
#> # Residual
#> 
#> Parameter         | Coefficient |   CI
#> --------------------------------------
#> SD (Observations) |       25.59 | 0.95
#> 
#> # subgrp:grp
#> 
#> Parameter      | Coefficient |   CI
#> -----------------------------------
#> SD (Intercept) |        0.00 | 0.95
#> 
#> # Subject
#> 
#> Parameter            | Coefficient |   CI
#> -----------------------------------------
#> SD (Intercept)       |       24.74 | 0.95
#> SD (Days)            |        5.92 | 0.95
#> Rho (Intercept~Days) |        0.26 | 0.95
#> 
#> # grp
#> 
#> Parameter      | Coefficient |   CI
#> -----------------------------------
#> SD (Intercept) |        0.00 | 0.95

model_parameters(model, effects = "all")
#> # Fixed Effects
#> 
#> Parameter   | Coefficient |   SE |           95% CI
#> ---------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78]
#> Days        |       10.47 | 1.55 | [  7.44,  13.50]
#> 
#> # Random Effects: subgrp:grp
#> 
#> Parameter          | Coefficient |   SE |       95% CI
#> ------------------------------------------------------
#> (Intercept) [1:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [1:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [6:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [7:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:1]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [8:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:2]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:3]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:4]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [9:5]  |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [10:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [11:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [12:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [13:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [13:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [14:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [15:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [16:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [17:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [18:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [19:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [20:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [21:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [22:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [23:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [24:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [25:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [26:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [27:5] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [28:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [29:4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [30:2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [30:5] |        0.00 | 0.00 | [0.00, 0.00]
#> 
#> # Random Effects Variances: subgrp:grp
#> 
#> Parameter      | Coefficient |   CI
#> -----------------------------------
#> SD (Intercept) |        0.00 | 0.95
#> 
#> # Random Effects: Subject
#> 
#> Parameter         | Coefficient |    SE |           95% CI
#> ----------------------------------------------------------
#> (Intercept) [308] |        2.26 | 12.07 | [-21.40,  25.92]
#> (Intercept) [309] |      -40.40 | 12.07 | [-64.06, -16.74]
#> (Intercept) [310] |      -38.96 | 12.07 | [-62.62, -15.30]
#> (Intercept) [330] |       23.69 | 12.07 | [  0.03,  47.35]
#> (Intercept) [331] |       22.26 | 12.07 | [ -1.40,  45.92]
#> (Intercept) [332] |        9.04 | 12.07 | [-14.62,  32.70]
#> (Intercept) [333] |       16.84 | 12.07 | [ -6.82,  40.50]
#> (Intercept) [334] |       -7.23 | 12.07 | [-30.89,  16.43]
#> (Intercept) [335] |       -0.33 | 12.07 | [-23.99,  23.32]
#> (Intercept) [337] |       34.89 | 12.07 | [ 11.23,  58.55]
#> (Intercept) [349] |      -25.21 | 12.07 | [-48.87,  -1.55]
#> (Intercept) [350] |      -13.07 | 12.07 | [-36.73,  10.59]
#> (Intercept) [351] |        4.58 | 12.07 | [-19.08,  28.24]
#> (Intercept) [352] |       20.86 | 12.07 | [ -2.79,  44.52]
#> (Intercept) [369] |        3.28 | 12.07 | [-20.38,  26.93]
#> (Intercept) [370] |      -25.61 | 12.07 | [-49.27,  -1.95]
#> (Intercept) [371] |        0.81 | 12.07 | [-22.85,  24.47]
#> (Intercept) [372] |       12.31 | 12.07 | [-11.34,  35.97]
#> Days [308]        |        9.20 |  2.30 | [  4.68,  13.72]
#> Days [309]        |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Days [310]        |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Days [330]        |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Days [331]        |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Days [332]        |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Days [333]        |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Days [334]        |        1.07 |  2.30 | [ -3.44,   5.59]
#> Days [335]        |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Days [337]        |        8.63 |  2.30 | [  4.11,  13.15]
#> Days [349]        |        1.17 |  2.30 | [ -3.34,   5.69]
#> Days [350]        |        6.61 |  2.30 | [  2.10,  11.13]
#> Days [351]        |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Days [352]        |        3.54 |  2.30 | [ -0.98,   8.05]
#> Days [369]        |        0.87 |  2.30 | [ -3.65,   5.39]
#> Days [370]        |        4.82 |  2.30 | [  0.31,   9.34]
#> Days [371]        |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Days [372]        |        1.28 |  2.30 | [ -3.23,   5.80]
#> 
#> # Random Effects Variances: Subject
#> 
#> Parameter            | Coefficient |   CI
#> -----------------------------------------
#> SD (Intercept)       |       24.74 | 0.95
#> SD (Days)            |        5.92 | 0.95
#> Rho (Intercept~Days) |        0.26 | 0.95
#> 
#> # Random Effects: grp
#> 
#> Parameter       | Coefficient |   SE |       95% CI
#> ---------------------------------------------------
#> (Intercept) [1] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [2] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [3] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [4] |        0.00 | 0.00 | [0.00, 0.00]
#> (Intercept) [5] |        0.00 | 0.00 | [0.00, 0.00]
#> 
#> # Random Effects Variances: grp
#> 
#> Parameter      | Coefficient |   CI
#> -----------------------------------
#> SD (Intercept) |        0.00 | 0.95
#> 
#> # Random Effects Variances: Residual
#> 
#> Parameter         | Coefficient |   CI
#> --------------------------------------
#> SD (Observations) |       25.59 | 0.95

as.data.frame(model_parameters(model))
#>     Parameter Coefficient       SE   CI     CI_low   CI_high         t df_error
#> 1 (Intercept)   251.40510 6.824563 0.95 238.029208 264.78100 36.838274      172
#> 2        Days    10.46729 1.545785 0.95   7.437604  13.49697  6.771503      172
#>               p
#> 1 4.506418e-297
#> 2  1.274513e-11

as.data.frame(model_parameters(model, effects = "random"))
#>       Parameter Level Coefficient        SE   CI       CI_low     CI_high
#> 1   (Intercept)   1:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 2   (Intercept)   1:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 3   (Intercept)   1:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 4   (Intercept)   1:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 5   (Intercept)   1:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 6   (Intercept)   2:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 7   (Intercept)   2:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 8   (Intercept)   2:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 9   (Intercept)   2:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 10  (Intercept)   3:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 11  (Intercept)   3:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 12  (Intercept)   3:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 13  (Intercept)   4:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 14  (Intercept)   4:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 15  (Intercept)   5:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 16  (Intercept)   5:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 17  (Intercept)   5:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 18  (Intercept)   5:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 19  (Intercept)   6:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 20  (Intercept)   6:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 21  (Intercept)   6:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 22  (Intercept)   7:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 23  (Intercept)   7:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 24  (Intercept)   7:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 25  (Intercept)   7:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 26  (Intercept)   7:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 27  (Intercept)   8:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 28  (Intercept)   8:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 29  (Intercept)   8:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 30  (Intercept)   8:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 31  (Intercept)   9:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 32  (Intercept)   9:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 33  (Intercept)   9:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 34  (Intercept)   9:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 35  (Intercept)  10:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 36  (Intercept)  10:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 37  (Intercept)  10:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 38  (Intercept)  10:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 39  (Intercept)  11:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 40  (Intercept)  11:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 41  (Intercept)  11:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 42  (Intercept)  11:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 43  (Intercept)  12:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 44  (Intercept)  12:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 45  (Intercept)  12:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 46  (Intercept)  13:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 47  (Intercept)  13:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 48  (Intercept)  14:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 49  (Intercept)  14:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 50  (Intercept)  14:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 51  (Intercept)  15:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 52  (Intercept)  15:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 53  (Intercept)  15:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 54  (Intercept)  16:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 55  (Intercept)  16:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 56  (Intercept)  16:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 57  (Intercept)  16:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 58  (Intercept)  17:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 59  (Intercept)  17:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 60  (Intercept)  17:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 61  (Intercept)  17:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 62  (Intercept)  18:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 63  (Intercept)  18:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 64  (Intercept)  18:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 65  (Intercept)  18:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 66  (Intercept)  18:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 67  (Intercept)  19:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 68  (Intercept)  19:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 69  (Intercept)  19:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 70  (Intercept)  19:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 71  (Intercept)  20:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 72  (Intercept)  20:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 73  (Intercept)  20:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 74  (Intercept)  20:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 75  (Intercept)  21:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 76  (Intercept)  21:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 77  (Intercept)  21:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 78  (Intercept)  21:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 79  (Intercept)  22:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 80  (Intercept)  22:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 81  (Intercept)  22:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 82  (Intercept)  23:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 83  (Intercept)  23:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 84  (Intercept)  23:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 85  (Intercept)  24:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 86  (Intercept)  24:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 87  (Intercept)  24:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 88  (Intercept)  25:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 89  (Intercept)  25:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 90  (Intercept)  25:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 91  (Intercept)  25:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 92  (Intercept)  26:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 93  (Intercept)  26:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 94  (Intercept)  26:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 95  (Intercept)  26:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 96  (Intercept)  26:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 97  (Intercept)  27:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 98  (Intercept)  27:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 99  (Intercept)  27:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 100 (Intercept)  27:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 101 (Intercept)  28:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 102 (Intercept)  28:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 103 (Intercept)  28:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 104 (Intercept)  29:1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 105 (Intercept)  29:3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 106 (Intercept)  29:4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 107 (Intercept)  30:2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 108 (Intercept)  30:5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 109 (Intercept)   308   2.2586490 12.070829 0.95 -21.39974083  25.9170388
#> 110 (Intercept)   309 -40.3986460 12.070829 0.95 -64.05703582 -16.7402562
#> 111 (Intercept)   310 -38.9602863 12.070829 0.95 -62.61867609 -15.3018965
#> 112 (Intercept)   330  23.6904488 12.070829 0.95   0.03205901  47.3488386
#> 113 (Intercept)   331  22.2601693 12.070829 0.95  -1.39822045  45.9185591
#> 114 (Intercept)   332   9.0395213 12.070829 0.95 -14.61886853  32.6979110
#> 115 (Intercept)   333  16.8404251 12.070829 0.95  -6.81796471  40.4988149
#> 116 (Intercept)   334  -7.2325676 12.070829 0.95 -30.89095743  16.4258221
#> 117 (Intercept)   335  -0.3337941 12.070829 0.95 -23.99218384  23.3245957
#> 118 (Intercept)   337  34.8904213 12.070829 0.95  11.23203155  58.5488111
#> 119 (Intercept)   349 -25.2100936 12.070829 0.95 -48.86848342  -1.5517038
#> 120 (Intercept)   350 -13.0698931 12.070829 0.95 -36.72828289  10.5884967
#> 121 (Intercept)   351   4.5778065 12.070829 0.95 -19.08058328  28.2361963
#> 122 (Intercept)   352  20.8636198 12.070829 0.95  -2.79476999  44.5220096
#> 123 (Intercept)   369   3.2754602 12.070829 0.95 -20.38292958  26.9338500
#> 124 (Intercept)   370 -25.6128192 12.070829 0.95 -49.27120900  -1.9544294
#> 125 (Intercept)   371   0.8070305 12.070829 0.95 -22.85135927  24.4654203
#> 126 (Intercept)   372  12.3145482 12.070829 0.95 -11.34384164  35.9729379
#> 127        Days   308   9.1989554  2.304835 0.95   4.68156229  13.7163486
#> 128        Days   309  -8.6196916  2.304835 0.95 -13.13708477  -4.1022985
#> 129        Days   310  -5.4488740  2.304835 0.95  -9.96626711  -0.9314808
#> 130        Days   330  -4.8143202  2.304835 0.95  -9.33171332  -0.2969270
#> 131        Days   331  -3.0698868  2.304835 0.95  -7.58727992   1.4475064
#> 132        Days   332  -0.2721692  2.304835 0.95  -4.78956240   4.2452239
#> 133        Days   333  -0.2236223  2.304835 0.95  -4.74101548   4.2937708
#> 134        Days   334   1.0745734  2.304835 0.95  -3.44281976   5.5919665
#> 135        Days   335 -10.7521396  2.304835 0.95 -15.26953276  -6.2347465
#> 136        Days   337   8.6282718  2.304835 0.95   4.11087867  13.1456650
#> 137        Days   349   1.1734096  2.304835 0.95  -3.34398359   5.6908027
#> 138        Days   350   6.6141917  2.304835 0.95   2.09679851  11.1315848
#> 139        Days   351  -3.0152512  2.304835 0.95  -7.53264440   1.5021419
#> 140        Days   352   3.5360090  2.304835 0.95  -0.98138415   8.0534022
#> 141        Days   369   0.8722153  2.304835 0.95  -3.64517780   5.3896085
#> 142        Days   370   4.8224533  2.304835 0.95   0.30506011   9.3398464
#> 143        Days   371  -0.9881532  2.304835 0.95  -5.50554637   3.5292399
#> 144        Days   372   1.2840287  2.304835 0.95  -3.23336449   5.8014218
#> 145 (Intercept)     1   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 146 (Intercept)     2   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 147 (Intercept)     3   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 148 (Intercept)     4   0.0000000  0.000000 0.95   0.00000000   0.0000000
#> 149 (Intercept)     5   0.0000000  0.000000 0.95   0.00000000   0.0000000
#>     Effects      Group
#> 1    random subgrp:grp
#> 2    random subgrp:grp
#> 3    random subgrp:grp
#> 4    random subgrp:grp
#> 5    random subgrp:grp
#> 6    random subgrp:grp
#> 7    random subgrp:grp
#> 8    random subgrp:grp
#> 9    random subgrp:grp
#> 10   random subgrp:grp
#> 11   random subgrp:grp
#> 12   random subgrp:grp
#> 13   random subgrp:grp
#> 14   random subgrp:grp
#> 15   random subgrp:grp
#> 16   random subgrp:grp
#> 17   random subgrp:grp
#> 18   random subgrp:grp
#> 19   random subgrp:grp
#> 20   random subgrp:grp
#> 21   random subgrp:grp
#> 22   random subgrp:grp
#> 23   random subgrp:grp
#> 24   random subgrp:grp
#> 25   random subgrp:grp
#> 26   random subgrp:grp
#> 27   random subgrp:grp
#> 28   random subgrp:grp
#> 29   random subgrp:grp
#> 30   random subgrp:grp
#> 31   random subgrp:grp
#> 32   random subgrp:grp
#> 33   random subgrp:grp
#> 34   random subgrp:grp
#> 35   random subgrp:grp
#> 36   random subgrp:grp
#> 37   random subgrp:grp
#> 38   random subgrp:grp
#> 39   random subgrp:grp
#> 40   random subgrp:grp
#> 41   random subgrp:grp
#> 42   random subgrp:grp
#> 43   random subgrp:grp
#> 44   random subgrp:grp
#> 45   random subgrp:grp
#> 46   random subgrp:grp
#> 47   random subgrp:grp
#> 48   random subgrp:grp
#> 49   random subgrp:grp
#> 50   random subgrp:grp
#> 51   random subgrp:grp
#> 52   random subgrp:grp
#> 53   random subgrp:grp
#> 54   random subgrp:grp
#> 55   random subgrp:grp
#> 56   random subgrp:grp
#> 57   random subgrp:grp
#> 58   random subgrp:grp
#> 59   random subgrp:grp
#> 60   random subgrp:grp
#> 61   random subgrp:grp
#> 62   random subgrp:grp
#> 63   random subgrp:grp
#> 64   random subgrp:grp
#> 65   random subgrp:grp
#> 66   random subgrp:grp
#> 67   random subgrp:grp
#> 68   random subgrp:grp
#> 69   random subgrp:grp
#> 70   random subgrp:grp
#> 71   random subgrp:grp
#> 72   random subgrp:grp
#> 73   random subgrp:grp
#> 74   random subgrp:grp
#> 75   random subgrp:grp
#> 76   random subgrp:grp
#> 77   random subgrp:grp
#> 78   random subgrp:grp
#> 79   random subgrp:grp
#> 80   random subgrp:grp
#> 81   random subgrp:grp
#> 82   random subgrp:grp
#> 83   random subgrp:grp
#> 84   random subgrp:grp
#> 85   random subgrp:grp
#> 86   random subgrp:grp
#> 87   random subgrp:grp
#> 88   random subgrp:grp
#> 89   random subgrp:grp
#> 90   random subgrp:grp
#> 91   random subgrp:grp
#> 92   random subgrp:grp
#> 93   random subgrp:grp
#> 94   random subgrp:grp
#> 95   random subgrp:grp
#> 96   random subgrp:grp
#> 97   random subgrp:grp
#> 98   random subgrp:grp
#> 99   random subgrp:grp
#> 100  random subgrp:grp
#> 101  random subgrp:grp
#> 102  random subgrp:grp
#> 103  random subgrp:grp
#> 104  random subgrp:grp
#> 105  random subgrp:grp
#> 106  random subgrp:grp
#> 107  random subgrp:grp
#> 108  random subgrp:grp
#> 109  random    Subject
#> 110  random    Subject
#> 111  random    Subject
#> 112  random    Subject
#> 113  random    Subject
#> 114  random    Subject
#> 115  random    Subject
#> 116  random    Subject
#> 117  random    Subject
#> 118  random    Subject
#> 119  random    Subject
#> 120  random    Subject
#> 121  random    Subject
#> 122  random    Subject
#> 123  random    Subject
#> 124  random    Subject
#> 125  random    Subject
#> 126  random    Subject
#> 127  random    Subject
#> 128  random    Subject
#> 129  random    Subject
#> 130  random    Subject
#> 131  random    Subject
#> 132  random    Subject
#> 133  random    Subject
#> 134  random    Subject
#> 135  random    Subject
#> 136  random    Subject
#> 137  random    Subject
#> 138  random    Subject
#> 139  random    Subject
#> 140  random    Subject
#> 141  random    Subject
#> 142  random    Subject
#> 143  random    Subject
#> 144  random    Subject
#> 145  random        grp
#> 146  random        grp
#> 147  random        grp
#> 148  random        grp
#> 149  random        grp

as.data.frame(model_parameters(model, effects = "random_variance"))
#>              Parameter Level Coefficient SE   CI CI_low CI_high
#> 1    SD (Observations)    NA  25.5918199 NA 0.95     NA      NA
#> 2       SD (Intercept)    NA   0.0000000 NA 0.95     NA      NA
#> 3       SD (Intercept)    NA  24.7404800 NA 0.95     NA      NA
#> 4       SD (Intercept)    NA   0.0000000 NA 0.95     NA      NA
#> 5            SD (Days)    NA   5.9221133 NA 0.95     NA      NA
#> 6 Rho (Intercept~Days)    NA   0.2560383 NA 0.95     NA      NA
#>            Effects      Group
#> 1 random_variances   Residual
#> 2 random_variances subgrp:grp
#> 3 random_variances    Subject
#> 4 random_variances        grp
#> 5 random_variances    Subject
#> 6 random_variances    Subject

as.data.frame(model_parameters(model, effects = "all"))
#>                Parameter Level Coefficient        SE   CI       CI_low
#> 1            (Intercept)  <NA> 251.4051048  6.824563 0.95 238.02920796
#> 2                   Days  <NA>  10.4672860  1.545785 0.95   7.43760357
#> 3            (Intercept)   1:1   0.0000000  0.000000 0.95   0.00000000
#> 4            (Intercept)   1:2   0.0000000  0.000000 0.95   0.00000000
#> 5            (Intercept)   1:3   0.0000000  0.000000 0.95   0.00000000
#> 6            (Intercept)   1:4   0.0000000  0.000000 0.95   0.00000000
#> 7            (Intercept)   1:5   0.0000000  0.000000 0.95   0.00000000
#> 8            (Intercept)   2:1   0.0000000  0.000000 0.95   0.00000000
#> 9            (Intercept)   2:2   0.0000000  0.000000 0.95   0.00000000
#> 10           (Intercept)   2:3   0.0000000  0.000000 0.95   0.00000000
#> 11           (Intercept)   2:5   0.0000000  0.000000 0.95   0.00000000
#> 12           (Intercept)   3:2   0.0000000  0.000000 0.95   0.00000000
#> 13           (Intercept)   3:4   0.0000000  0.000000 0.95   0.00000000
#> 14           (Intercept)   3:5   0.0000000  0.000000 0.95   0.00000000
#> 15           (Intercept)   4:1   0.0000000  0.000000 0.95   0.00000000
#> 16           (Intercept)   4:3   0.0000000  0.000000 0.95   0.00000000
#> 17           (Intercept)   5:1   0.0000000  0.000000 0.95   0.00000000
#> 18           (Intercept)   5:2   0.0000000  0.000000 0.95   0.00000000
#> 19           (Intercept)   5:3   0.0000000  0.000000 0.95   0.00000000
#> 20           (Intercept)   5:5   0.0000000  0.000000 0.95   0.00000000
#> 21           (Intercept)   6:1   0.0000000  0.000000 0.95   0.00000000
#> 22           (Intercept)   6:2   0.0000000  0.000000 0.95   0.00000000
#> 23           (Intercept)   6:4   0.0000000  0.000000 0.95   0.00000000
#> 24           (Intercept)   7:1   0.0000000  0.000000 0.95   0.00000000
#> 25           (Intercept)   7:2   0.0000000  0.000000 0.95   0.00000000
#> 26           (Intercept)   7:3   0.0000000  0.000000 0.95   0.00000000
#> 27           (Intercept)   7:4   0.0000000  0.000000 0.95   0.00000000
#> 28           (Intercept)   7:5   0.0000000  0.000000 0.95   0.00000000
#> 29           (Intercept)   8:1   0.0000000  0.000000 0.95   0.00000000
#> 30           (Intercept)   8:2   0.0000000  0.000000 0.95   0.00000000
#> 31           (Intercept)   8:3   0.0000000  0.000000 0.95   0.00000000
#> 32           (Intercept)   8:5   0.0000000  0.000000 0.95   0.00000000
#> 33           (Intercept)   9:2   0.0000000  0.000000 0.95   0.00000000
#> 34           (Intercept)   9:3   0.0000000  0.000000 0.95   0.00000000
#> 35           (Intercept)   9:4   0.0000000  0.000000 0.95   0.00000000
#> 36           (Intercept)   9:5   0.0000000  0.000000 0.95   0.00000000
#> 37           (Intercept)  10:1   0.0000000  0.000000 0.95   0.00000000
#> 38           (Intercept)  10:3   0.0000000  0.000000 0.95   0.00000000
#> 39           (Intercept)  10:4   0.0000000  0.000000 0.95   0.00000000
#> 40           (Intercept)  10:5   0.0000000  0.000000 0.95   0.00000000
#> 41           (Intercept)  11:1   0.0000000  0.000000 0.95   0.00000000
#> 42           (Intercept)  11:2   0.0000000  0.000000 0.95   0.00000000
#> 43           (Intercept)  11:3   0.0000000  0.000000 0.95   0.00000000
#> 44           (Intercept)  11:4   0.0000000  0.000000 0.95   0.00000000
#> 45           (Intercept)  12:2   0.0000000  0.000000 0.95   0.00000000
#> 46           (Intercept)  12:4   0.0000000  0.000000 0.95   0.00000000
#> 47           (Intercept)  12:5   0.0000000  0.000000 0.95   0.00000000
#> 48           (Intercept)  13:2   0.0000000  0.000000 0.95   0.00000000
#> 49           (Intercept)  13:5   0.0000000  0.000000 0.95   0.00000000
#> 50           (Intercept)  14:1   0.0000000  0.000000 0.95   0.00000000
#> 51           (Intercept)  14:2   0.0000000  0.000000 0.95   0.00000000
#> 52           (Intercept)  14:4   0.0000000  0.000000 0.95   0.00000000
#> 53           (Intercept)  15:1   0.0000000  0.000000 0.95   0.00000000
#> 54           (Intercept)  15:2   0.0000000  0.000000 0.95   0.00000000
#> 55           (Intercept)  15:5   0.0000000  0.000000 0.95   0.00000000
#> 56           (Intercept)  16:1   0.0000000  0.000000 0.95   0.00000000
#> 57           (Intercept)  16:2   0.0000000  0.000000 0.95   0.00000000
#> 58           (Intercept)  16:3   0.0000000  0.000000 0.95   0.00000000
#> 59           (Intercept)  16:5   0.0000000  0.000000 0.95   0.00000000
#> 60           (Intercept)  17:1   0.0000000  0.000000 0.95   0.00000000
#> 61           (Intercept)  17:2   0.0000000  0.000000 0.95   0.00000000
#> 62           (Intercept)  17:4   0.0000000  0.000000 0.95   0.00000000
#> 63           (Intercept)  17:5   0.0000000  0.000000 0.95   0.00000000
#> 64           (Intercept)  18:1   0.0000000  0.000000 0.95   0.00000000
#> 65           (Intercept)  18:2   0.0000000  0.000000 0.95   0.00000000
#> 66           (Intercept)  18:3   0.0000000  0.000000 0.95   0.00000000
#> 67           (Intercept)  18:4   0.0000000  0.000000 0.95   0.00000000
#> 68           (Intercept)  18:5   0.0000000  0.000000 0.95   0.00000000
#> 69           (Intercept)  19:1   0.0000000  0.000000 0.95   0.00000000
#> 70           (Intercept)  19:2   0.0000000  0.000000 0.95   0.00000000
#> 71           (Intercept)  19:3   0.0000000  0.000000 0.95   0.00000000
#> 72           (Intercept)  19:4   0.0000000  0.000000 0.95   0.00000000
#> 73           (Intercept)  20:1   0.0000000  0.000000 0.95   0.00000000
#> 74           (Intercept)  20:3   0.0000000  0.000000 0.95   0.00000000
#> 75           (Intercept)  20:4   0.0000000  0.000000 0.95   0.00000000
#> 76           (Intercept)  20:5   0.0000000  0.000000 0.95   0.00000000
#> 77           (Intercept)  21:1   0.0000000  0.000000 0.95   0.00000000
#> 78           (Intercept)  21:2   0.0000000  0.000000 0.95   0.00000000
#> 79           (Intercept)  21:3   0.0000000  0.000000 0.95   0.00000000
#> 80           (Intercept)  21:4   0.0000000  0.000000 0.95   0.00000000
#> 81           (Intercept)  22:2   0.0000000  0.000000 0.95   0.00000000
#> 82           (Intercept)  22:3   0.0000000  0.000000 0.95   0.00000000
#> 83           (Intercept)  22:4   0.0000000  0.000000 0.95   0.00000000
#> 84           (Intercept)  23:1   0.0000000  0.000000 0.95   0.00000000
#> 85           (Intercept)  23:4   0.0000000  0.000000 0.95   0.00000000
#> 86           (Intercept)  23:5   0.0000000  0.000000 0.95   0.00000000
#> 87           (Intercept)  24:2   0.0000000  0.000000 0.95   0.00000000
#> 88           (Intercept)  24:3   0.0000000  0.000000 0.95   0.00000000
#> 89           (Intercept)  24:4   0.0000000  0.000000 0.95   0.00000000
#> 90           (Intercept)  25:2   0.0000000  0.000000 0.95   0.00000000
#> 91           (Intercept)  25:3   0.0000000  0.000000 0.95   0.00000000
#> 92           (Intercept)  25:4   0.0000000  0.000000 0.95   0.00000000
#> 93           (Intercept)  25:5   0.0000000  0.000000 0.95   0.00000000
#> 94           (Intercept)  26:1   0.0000000  0.000000 0.95   0.00000000
#> 95           (Intercept)  26:2   0.0000000  0.000000 0.95   0.00000000
#> 96           (Intercept)  26:3   0.0000000  0.000000 0.95   0.00000000
#> 97           (Intercept)  26:4   0.0000000  0.000000 0.95   0.00000000
#> 98           (Intercept)  26:5   0.0000000  0.000000 0.95   0.00000000
#> 99           (Intercept)  27:1   0.0000000  0.000000 0.95   0.00000000
#> 100          (Intercept)  27:2   0.0000000  0.000000 0.95   0.00000000
#> 101          (Intercept)  27:4   0.0000000  0.000000 0.95   0.00000000
#> 102          (Intercept)  27:5   0.0000000  0.000000 0.95   0.00000000
#> 103          (Intercept)  28:1   0.0000000  0.000000 0.95   0.00000000
#> 104          (Intercept)  28:3   0.0000000  0.000000 0.95   0.00000000
#> 105          (Intercept)  28:4   0.0000000  0.000000 0.95   0.00000000
#> 106          (Intercept)  29:1   0.0000000  0.000000 0.95   0.00000000
#> 107          (Intercept)  29:3   0.0000000  0.000000 0.95   0.00000000
#> 108          (Intercept)  29:4   0.0000000  0.000000 0.95   0.00000000
#> 109          (Intercept)  30:2   0.0000000  0.000000 0.95   0.00000000
#> 110          (Intercept)  30:5   0.0000000  0.000000 0.95   0.00000000
#> 111          (Intercept)   308   2.2586490 12.070829 0.95 -21.39974083
#> 112          (Intercept)   309 -40.3986460 12.070829 0.95 -64.05703582
#> 113          (Intercept)   310 -38.9602863 12.070829 0.95 -62.61867609
#> 114          (Intercept)   330  23.6904488 12.070829 0.95   0.03205901
#> 115          (Intercept)   331  22.2601693 12.070829 0.95  -1.39822045
#> 116          (Intercept)   332   9.0395213 12.070829 0.95 -14.61886853
#> 117          (Intercept)   333  16.8404251 12.070829 0.95  -6.81796471
#> 118          (Intercept)   334  -7.2325676 12.070829 0.95 -30.89095743
#> 119          (Intercept)   335  -0.3337941 12.070829 0.95 -23.99218384
#> 120          (Intercept)   337  34.8904213 12.070829 0.95  11.23203155
#> 121          (Intercept)   349 -25.2100936 12.070829 0.95 -48.86848342
#> 122          (Intercept)   350 -13.0698931 12.070829 0.95 -36.72828289
#> 123          (Intercept)   351   4.5778065 12.070829 0.95 -19.08058328
#> 124          (Intercept)   352  20.8636198 12.070829 0.95  -2.79476999
#> 125          (Intercept)   369   3.2754602 12.070829 0.95 -20.38292958
#> 126          (Intercept)   370 -25.6128192 12.070829 0.95 -49.27120900
#> 127          (Intercept)   371   0.8070305 12.070829 0.95 -22.85135927
#> 128          (Intercept)   372  12.3145482 12.070829 0.95 -11.34384164
#> 129                 Days   308   9.1989554  2.304835 0.95   4.68156229
#> 130                 Days   309  -8.6196916  2.304835 0.95 -13.13708477
#> 131                 Days   310  -5.4488740  2.304835 0.95  -9.96626711
#> 132                 Days   330  -4.8143202  2.304835 0.95  -9.33171332
#> 133                 Days   331  -3.0698868  2.304835 0.95  -7.58727992
#> 134                 Days   332  -0.2721692  2.304835 0.95  -4.78956240
#> 135                 Days   333  -0.2236223  2.304835 0.95  -4.74101548
#> 136                 Days   334   1.0745734  2.304835 0.95  -3.44281976
#> 137                 Days   335 -10.7521396  2.304835 0.95 -15.26953276
#> 138                 Days   337   8.6282718  2.304835 0.95   4.11087867
#> 139                 Days   349   1.1734096  2.304835 0.95  -3.34398359
#> 140                 Days   350   6.6141917  2.304835 0.95   2.09679851
#> 141                 Days   351  -3.0152512  2.304835 0.95  -7.53264440
#> 142                 Days   352   3.5360090  2.304835 0.95  -0.98138415
#> 143                 Days   369   0.8722153  2.304835 0.95  -3.64517780
#> 144                 Days   370   4.8224533  2.304835 0.95   0.30506011
#> 145                 Days   371  -0.9881532  2.304835 0.95  -5.50554637
#> 146                 Days   372   1.2840287  2.304835 0.95  -3.23336449
#> 147          (Intercept)     1   0.0000000  0.000000 0.95   0.00000000
#> 148          (Intercept)     2   0.0000000  0.000000 0.95   0.00000000
#> 149          (Intercept)     3   0.0000000  0.000000 0.95   0.00000000
#> 150          (Intercept)     4   0.0000000  0.000000 0.95   0.00000000
#> 151          (Intercept)     5   0.0000000  0.000000 0.95   0.00000000
#> 152    SD (Observations)  <NA>  25.5918199        NA 0.95           NA
#> 153       SD (Intercept)  <NA>   0.0000000        NA 0.95           NA
#> 154       SD (Intercept)  <NA>  24.7404800        NA 0.95           NA
#> 155       SD (Intercept)  <NA>   0.0000000        NA 0.95           NA
#> 156            SD (Days)  <NA>   5.9221133        NA 0.95           NA
#> 157 Rho (Intercept~Days)  <NA>   0.2560383        NA 0.95           NA
#>         CI_high          Effects      Group
#> 1   264.7810017            fixed           
#> 2    13.4969683            fixed           
#> 3     0.0000000           random subgrp:grp
#> 4     0.0000000           random subgrp:grp
#> 5     0.0000000           random subgrp:grp
#> 6     0.0000000           random subgrp:grp
#> 7     0.0000000           random subgrp:grp
#> 8     0.0000000           random subgrp:grp
#> 9     0.0000000           random subgrp:grp
#> 10    0.0000000           random subgrp:grp
#> 11    0.0000000           random subgrp:grp
#> 12    0.0000000           random subgrp:grp
#> 13    0.0000000           random subgrp:grp
#> 14    0.0000000           random subgrp:grp
#> 15    0.0000000           random subgrp:grp
#> 16    0.0000000           random subgrp:grp
#> 17    0.0000000           random subgrp:grp
#> 18    0.0000000           random subgrp:grp
#> 19    0.0000000           random subgrp:grp
#> 20    0.0000000           random subgrp:grp
#> 21    0.0000000           random subgrp:grp
#> 22    0.0000000           random subgrp:grp
#> 23    0.0000000           random subgrp:grp
#> 24    0.0000000           random subgrp:grp
#> 25    0.0000000           random subgrp:grp
#> 26    0.0000000           random subgrp:grp
#> 27    0.0000000           random subgrp:grp
#> 28    0.0000000           random subgrp:grp
#> 29    0.0000000           random subgrp:grp
#> 30    0.0000000           random subgrp:grp
#> 31    0.0000000           random subgrp:grp
#> 32    0.0000000           random subgrp:grp
#> 33    0.0000000           random subgrp:grp
#> 34    0.0000000           random subgrp:grp
#> 35    0.0000000           random subgrp:grp
#> 36    0.0000000           random subgrp:grp
#> 37    0.0000000           random subgrp:grp
#> 38    0.0000000           random subgrp:grp
#> 39    0.0000000           random subgrp:grp
#> 40    0.0000000           random subgrp:grp
#> 41    0.0000000           random subgrp:grp
#> 42    0.0000000           random subgrp:grp
#> 43    0.0000000           random subgrp:grp
#> 44    0.0000000           random subgrp:grp
#> 45    0.0000000           random subgrp:grp
#> 46    0.0000000           random subgrp:grp
#> 47    0.0000000           random subgrp:grp
#> 48    0.0000000           random subgrp:grp
#> 49    0.0000000           random subgrp:grp
#> 50    0.0000000           random subgrp:grp
#> 51    0.0000000           random subgrp:grp
#> 52    0.0000000           random subgrp:grp
#> 53    0.0000000           random subgrp:grp
#> 54    0.0000000           random subgrp:grp
#> 55    0.0000000           random subgrp:grp
#> 56    0.0000000           random subgrp:grp
#> 57    0.0000000           random subgrp:grp
#> 58    0.0000000           random subgrp:grp
#> 59    0.0000000           random subgrp:grp
#> 60    0.0000000           random subgrp:grp
#> 61    0.0000000           random subgrp:grp
#> 62    0.0000000           random subgrp:grp
#> 63    0.0000000           random subgrp:grp
#> 64    0.0000000           random subgrp:grp
#> 65    0.0000000           random subgrp:grp
#> 66    0.0000000           random subgrp:grp
#> 67    0.0000000           random subgrp:grp
#> 68    0.0000000           random subgrp:grp
#> 69    0.0000000           random subgrp:grp
#> 70    0.0000000           random subgrp:grp
#> 71    0.0000000           random subgrp:grp
#> 72    0.0000000           random subgrp:grp
#> 73    0.0000000           random subgrp:grp
#> 74    0.0000000           random subgrp:grp
#> 75    0.0000000           random subgrp:grp
#> 76    0.0000000           random subgrp:grp
#> 77    0.0000000           random subgrp:grp
#> 78    0.0000000           random subgrp:grp
#> 79    0.0000000           random subgrp:grp
#> 80    0.0000000           random subgrp:grp
#> 81    0.0000000           random subgrp:grp
#> 82    0.0000000           random subgrp:grp
#> 83    0.0000000           random subgrp:grp
#> 84    0.0000000           random subgrp:grp
#> 85    0.0000000           random subgrp:grp
#> 86    0.0000000           random subgrp:grp
#> 87    0.0000000           random subgrp:grp
#> 88    0.0000000           random subgrp:grp
#> 89    0.0000000           random subgrp:grp
#> 90    0.0000000           random subgrp:grp
#> 91    0.0000000           random subgrp:grp
#> 92    0.0000000           random subgrp:grp
#> 93    0.0000000           random subgrp:grp
#> 94    0.0000000           random subgrp:grp
#> 95    0.0000000           random subgrp:grp
#> 96    0.0000000           random subgrp:grp
#> 97    0.0000000           random subgrp:grp
#> 98    0.0000000           random subgrp:grp
#> 99    0.0000000           random subgrp:grp
#> 100   0.0000000           random subgrp:grp
#> 101   0.0000000           random subgrp:grp
#> 102   0.0000000           random subgrp:grp
#> 103   0.0000000           random subgrp:grp
#> 104   0.0000000           random subgrp:grp
#> 105   0.0000000           random subgrp:grp
#> 106   0.0000000           random subgrp:grp
#> 107   0.0000000           random subgrp:grp
#> 108   0.0000000           random subgrp:grp
#> 109   0.0000000           random subgrp:grp
#> 110   0.0000000           random subgrp:grp
#> 111  25.9170388           random    Subject
#> 112 -16.7402562           random    Subject
#> 113 -15.3018965           random    Subject
#> 114  47.3488386           random    Subject
#> 115  45.9185591           random    Subject
#> 116  32.6979110           random    Subject
#> 117  40.4988149           random    Subject
#> 118  16.4258221           random    Subject
#> 119  23.3245957           random    Subject
#> 120  58.5488111           random    Subject
#> 121  -1.5517038           random    Subject
#> 122  10.5884967           random    Subject
#> 123  28.2361963           random    Subject
#> 124  44.5220096           random    Subject
#> 125  26.9338500           random    Subject
#> 126  -1.9544294           random    Subject
#> 127  24.4654203           random    Subject
#> 128  35.9729379           random    Subject
#> 129  13.7163486           random    Subject
#> 130  -4.1022985           random    Subject
#> 131  -0.9314808           random    Subject
#> 132  -0.2969270           random    Subject
#> 133   1.4475064           random    Subject
#> 134   4.2452239           random    Subject
#> 135   4.2937708           random    Subject
#> 136   5.5919665           random    Subject
#> 137  -6.2347465           random    Subject
#> 138  13.1456650           random    Subject
#> 139   5.6908027           random    Subject
#> 140  11.1315848           random    Subject
#> 141   1.5021419           random    Subject
#> 142   8.0534022           random    Subject
#> 143   5.3896085           random    Subject
#> 144   9.3398464           random    Subject
#> 145   3.5292399           random    Subject
#> 146   5.8014218           random    Subject
#> 147   0.0000000           random        grp
#> 148   0.0000000           random        grp
#> 149   0.0000000           random        grp
#> 150   0.0000000           random        grp
#> 151   0.0000000           random        grp
#> 152          NA random_variances   Residual
#> 153          NA random_variances subgrp:grp
#> 154          NA random_variances    Subject
#> 155          NA random_variances        grp
#> 156          NA random_variances    Subject
#> 157          NA random_variances    Subject

Created on 2021-03-04 by the reprex package (v1.0.0)

strengejacke commented 3 years ago
library(lme4)
#> Loading required package: Matrix
library(parameters)
data(sleepstudy)
model <- lmer(
  Reaction ~ Days + (1 + Days | Subject),
  data = sleepstudy
)

model_parameters(model)
#> Parameter   | Coefficient |   SE |           95% CI | t(174) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78] |  36.84 | < .001
#> Days        |       10.47 | 1.55 | [  7.44,  13.50] |   6.77 | < .001

model_parameters(model, effects = "random")
#> Parameter   | Level | Coefficient |    SE |           95% CI
#> ------------------------------------------------------------
#> (Intercept) |   308 |        2.26 | 12.07 | [-21.40,  25.92]
#> (Intercept) |   309 |      -40.40 | 12.07 | [-64.06, -16.74]
#> (Intercept) |   310 |      -38.96 | 12.07 | [-62.62, -15.30]
#> (Intercept) |   330 |       23.69 | 12.07 | [  0.03,  47.35]
#> (Intercept) |   331 |       22.26 | 12.07 | [ -1.40,  45.92]
#> (Intercept) |   332 |        9.04 | 12.07 | [-14.62,  32.70]
#> (Intercept) |   333 |       16.84 | 12.07 | [ -6.82,  40.50]
#> (Intercept) |   334 |       -7.23 | 12.07 | [-30.89,  16.43]
#> (Intercept) |   335 |       -0.33 | 12.07 | [-23.99,  23.32]
#> (Intercept) |   337 |       34.89 | 12.07 | [ 11.23,  58.55]
#> (Intercept) |   349 |      -25.21 | 12.07 | [-48.87,  -1.55]
#> (Intercept) |   350 |      -13.07 | 12.07 | [-36.73,  10.59]
#> (Intercept) |   351 |        4.58 | 12.07 | [-19.08,  28.24]
#> (Intercept) |   352 |       20.86 | 12.07 | [ -2.79,  44.52]
#> (Intercept) |   369 |        3.28 | 12.07 | [-20.38,  26.93]
#> (Intercept) |   370 |      -25.61 | 12.07 | [-49.27,  -1.95]
#> (Intercept) |   371 |        0.81 | 12.07 | [-22.85,  24.47]
#> (Intercept) |   372 |       12.31 | 12.07 | [-11.34,  35.97]
#> Days        |   308 |        9.20 |  2.30 | [  4.68,  13.72]
#> Days        |   309 |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Days        |   310 |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Days        |   330 |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Days        |   331 |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Days        |   332 |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Days        |   333 |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Days        |   334 |        1.07 |  2.30 | [ -3.44,   5.59]
#> Days        |   335 |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Days        |   337 |        8.63 |  2.30 | [  4.11,  13.15]
#> Days        |   349 |        1.17 |  2.30 | [ -3.34,   5.69]
#> Days        |   350 |        6.61 |  2.30 | [  2.10,  11.13]
#> Days        |   351 |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Days        |   352 |        3.54 |  2.30 | [ -0.98,   8.05]
#> Days        |   369 |        0.87 |  2.30 | [ -3.65,   5.39]
#> Days        |   370 |        4.82 |  2.30 | [  0.31,   9.34]
#> Days        |   371 |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Days        |   372 |        1.28 |  2.30 | [ -3.23,   5.80]

model_parameters(model, effects = "random_variance")
#> # Residual
#> 
#> Parameter         | Coefficient |   CI
#> --------------------------------------
#> SD (Observations) |       25.59 | 0.95
#> 
#> # Subject
#> 
#> Parameter            | Coefficient |   CI
#> -----------------------------------------
#> SD (Intercept)       |       24.74 | 0.95
#> SD (Days)            |        5.92 | 0.95
#> Rho (Intercept~Days) |        0.26 | 0.95

model_parameters(model, effects = "all")
#> # Fixed Effects
#> 
#> Parameter   | Coefficient |   SE |           95% CI
#> ---------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78]
#> Days        |       10.47 | 1.55 | [  7.44,  13.50]
#> 
#> # Random Effects: Subject
#> 
#> Parameter         | Coefficient |    SE |           95% CI
#> ----------------------------------------------------------
#> (Intercept) [308] |        2.26 | 12.07 | [-21.40,  25.92]
#> (Intercept) [309] |      -40.40 | 12.07 | [-64.06, -16.74]
#> (Intercept) [310] |      -38.96 | 12.07 | [-62.62, -15.30]
#> (Intercept) [330] |       23.69 | 12.07 | [  0.03,  47.35]
#> (Intercept) [331] |       22.26 | 12.07 | [ -1.40,  45.92]
#> (Intercept) [332] |        9.04 | 12.07 | [-14.62,  32.70]
#> (Intercept) [333] |       16.84 | 12.07 | [ -6.82,  40.50]
#> (Intercept) [334] |       -7.23 | 12.07 | [-30.89,  16.43]
#> (Intercept) [335] |       -0.33 | 12.07 | [-23.99,  23.32]
#> (Intercept) [337] |       34.89 | 12.07 | [ 11.23,  58.55]
#> (Intercept) [349] |      -25.21 | 12.07 | [-48.87,  -1.55]
#> (Intercept) [350] |      -13.07 | 12.07 | [-36.73,  10.59]
#> (Intercept) [351] |        4.58 | 12.07 | [-19.08,  28.24]
#> (Intercept) [352] |       20.86 | 12.07 | [ -2.79,  44.52]
#> (Intercept) [369] |        3.28 | 12.07 | [-20.38,  26.93]
#> (Intercept) [370] |      -25.61 | 12.07 | [-49.27,  -1.95]
#> (Intercept) [371] |        0.81 | 12.07 | [-22.85,  24.47]
#> (Intercept) [372] |       12.31 | 12.07 | [-11.34,  35.97]
#> Days [308]        |        9.20 |  2.30 | [  4.68,  13.72]
#> Days [309]        |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Days [310]        |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Days [330]        |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Days [331]        |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Days [332]        |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Days [333]        |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Days [334]        |        1.07 |  2.30 | [ -3.44,   5.59]
#> Days [335]        |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Days [337]        |        8.63 |  2.30 | [  4.11,  13.15]
#> Days [349]        |        1.17 |  2.30 | [ -3.34,   5.69]
#> Days [350]        |        6.61 |  2.30 | [  2.10,  11.13]
#> Days [351]        |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Days [352]        |        3.54 |  2.30 | [ -0.98,   8.05]
#> Days [369]        |        0.87 |  2.30 | [ -3.65,   5.39]
#> Days [370]        |        4.82 |  2.30 | [  0.31,   9.34]
#> Days [371]        |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Days [372]        |        1.28 |  2.30 | [ -3.23,   5.80]
#> 
#> # Random Effects Variances: Subject
#> 
#> Parameter            | Coefficient |   CI
#> -----------------------------------------
#> SD (Intercept)       |       24.74 | 0.95
#> SD (Days)            |        5.92 | 0.95
#> Rho (Intercept~Days) |        0.26 | 0.95
#> 
#> # Random Effects Variances: Residual
#> 
#> Parameter         | Coefficient |   CI
#> --------------------------------------
#> SD (Observations) |       25.59 | 0.95

as.data.frame(model_parameters(model))
#>     Parameter Coefficient       SE   CI     CI_low   CI_high         t df_error
#> 1 (Intercept)   251.40510 6.824597 0.95 238.029141 264.78107 36.838090      174
#> 2        Days    10.46729 1.545790 0.95   7.437594  13.49698  6.771481      174
#>               p
#> 1 4.537104e-297
#> 2  1.274703e-11

as.data.frame(model_parameters(model, effects = "random"))
#>      Parameter Level Coefficient        SE   CI       CI_low     CI_high
#> 1  (Intercept)   308   2.2585509 12.070857 0.95 -21.39989394  25.9169958
#> 2  (Intercept)   309 -40.3987381 12.070857 0.95 -64.05718296 -16.7402932
#> 3  (Intercept)   310 -38.9604090 12.070857 0.95 -62.61885384 -15.3019641
#> 4  (Intercept)   330  23.6906196 12.070857 0.95   0.03217468  47.3490645
#> 5  (Intercept)   331  22.2603126 12.070857 0.95  -1.39813230  45.9187575
#> 6  (Intercept)   332   9.0395679 12.070857 0.95 -14.61887699  32.6980128
#> 7  (Intercept)   333  16.8405086 12.070857 0.95  -6.81793627  40.4989535
#> 8  (Intercept)   334  -7.2326151 12.070857 0.95 -30.89105998  16.4258298
#> 9  (Intercept)   335  -0.3336684 12.070857 0.95 -23.99211330  23.3247765
#> 10 (Intercept)   337  34.8904868 12.070857 0.95  11.23204194  58.5489317
#> 11 (Intercept)   349 -25.2102286 12.070857 0.95 -48.86867349  -1.5517837
#> 12 (Intercept)   350 -13.0700342 12.070857 0.95 -36.72847904  10.5884107
#> 13 (Intercept)   351   4.5778642 12.070857 0.95 -19.08058071  28.2363091
#> 14 (Intercept)   352  20.8636782 12.070857 0.95  -2.79476671  44.5221231
#> 15 (Intercept)   369   3.2754656 12.070857 0.95 -20.38297926  26.9339105
#> 16 (Intercept)   370 -25.6129993 12.070857 0.95 -49.27144419  -1.9545544
#> 17 (Intercept)   371   0.8070461 12.070857 0.95 -22.85139880  24.4654910
#> 18 (Intercept)   372  12.3145921 12.070857 0.95 -11.34385278  35.9730370
#> 19        Days   308   9.1989758  2.304839 0.95   4.68157429  13.7163772
#> 20        Days   309  -8.6196806  2.304839 0.95 -13.13708209  -4.1022791
#> 21        Days   310  -5.4488565  2.304839 0.95  -9.96625794  -0.9314550
#> 22        Days   330  -4.8143503  2.304839 0.95  -9.33175179  -0.2969488
#> 23        Days   331  -3.0699116  2.304839 0.95  -7.58731308   1.4474899
#> 24        Days   332  -0.2721770  2.304839 0.95  -4.78957847   4.2452245
#> 25        Days   333  -0.2236361  2.304839 0.95  -4.74103755   4.2937654
#> 26        Days   334   1.0745816  2.304839 0.95  -3.44281982   5.5919831
#> 27        Days   335 -10.7521652  2.304839 0.95 -15.26956665  -6.2347637
#> 28        Days   337   8.6282652  2.304839 0.95   4.11086369  13.1456666
#> 29        Days   349   1.1734322  2.304839 0.95  -3.34396930   5.6908336
#> 30        Days   350   6.6142178  2.304839 0.95   2.09681634  11.1316193
#> 31        Days   351  -3.0152621  2.304839 0.95  -7.53266355   1.5021394
#> 32        Days   352   3.5360011  2.304839 0.95  -0.98140035   8.0534026
#> 33        Days   369   0.8722149  2.304839 0.95  -3.64518660   5.3896163
#> 34        Days   370   4.8224850  2.304839 0.95   0.30508348   9.3398864
#> 35        Days   371  -0.9881562  2.304839 0.95  -5.50555769   3.5292452
#> 36        Days   372   1.2840221  2.304839 0.95  -3.23337939   5.8014235
#>    Effects   Group
#> 1   random Subject
#> 2   random Subject
#> 3   random Subject
#> 4   random Subject
#> 5   random Subject
#> 6   random Subject
#> 7   random Subject
#> 8   random Subject
#> 9   random Subject
#> 10  random Subject
#> 11  random Subject
#> 12  random Subject
#> 13  random Subject
#> 14  random Subject
#> 15  random Subject
#> 16  random Subject
#> 17  random Subject
#> 18  random Subject
#> 19  random Subject
#> 20  random Subject
#> 21  random Subject
#> 22  random Subject
#> 23  random Subject
#> 24  random Subject
#> 25  random Subject
#> 26  random Subject
#> 27  random Subject
#> 28  random Subject
#> 29  random Subject
#> 30  random Subject
#> 31  random Subject
#> 32  random Subject
#> 33  random Subject
#> 34  random Subject
#> 35  random Subject
#> 36  random Subject

as.data.frame(model_parameters(model, effects = "random_variance"))
#>              Parameter Level Coefficient SE   CI CI_low CI_high
#> 1    SD (Observations)    NA  25.5917957 NA 0.95     NA      NA
#> 2       SD (Intercept)    NA  24.7406580 NA 0.95     NA      NA
#> 3            SD (Days)    NA   5.9221377 NA 0.95     NA      NA
#> 4 Rho (Intercept~Days)    NA   0.2560298 NA 0.95     NA      NA
#>            Effects    Group
#> 1 random_variances Residual
#> 2 random_variances  Subject
#> 3 random_variances  Subject
#> 4 random_variances  Subject

as.data.frame(model_parameters(model, effects = "all"))
#>               Parameter Level Coefficient        SE   CI       CI_low
#> 1           (Intercept)  <NA> 251.4051048  6.824597 0.95 238.02914112
#> 2                  Days  <NA>  10.4672860  1.545790 0.95   7.43759393
#> 3           (Intercept)   308   2.2585509 12.070857 0.95 -21.39989394
#> 4           (Intercept)   309 -40.3987381 12.070857 0.95 -64.05718296
#> 5           (Intercept)   310 -38.9604090 12.070857 0.95 -62.61885384
#> 6           (Intercept)   330  23.6906196 12.070857 0.95   0.03217468
#> 7           (Intercept)   331  22.2603126 12.070857 0.95  -1.39813230
#> 8           (Intercept)   332   9.0395679 12.070857 0.95 -14.61887699
#> 9           (Intercept)   333  16.8405086 12.070857 0.95  -6.81793627
#> 10          (Intercept)   334  -7.2326151 12.070857 0.95 -30.89105998
#> 11          (Intercept)   335  -0.3336684 12.070857 0.95 -23.99211330
#> 12          (Intercept)   337  34.8904868 12.070857 0.95  11.23204194
#> 13          (Intercept)   349 -25.2102286 12.070857 0.95 -48.86867349
#> 14          (Intercept)   350 -13.0700342 12.070857 0.95 -36.72847904
#> 15          (Intercept)   351   4.5778642 12.070857 0.95 -19.08058071
#> 16          (Intercept)   352  20.8636782 12.070857 0.95  -2.79476671
#> 17          (Intercept)   369   3.2754656 12.070857 0.95 -20.38297926
#> 18          (Intercept)   370 -25.6129993 12.070857 0.95 -49.27144419
#> 19          (Intercept)   371   0.8070461 12.070857 0.95 -22.85139880
#> 20          (Intercept)   372  12.3145921 12.070857 0.95 -11.34385278
#> 21                 Days   308   9.1989758  2.304839 0.95   4.68157429
#> 22                 Days   309  -8.6196806  2.304839 0.95 -13.13708209
#> 23                 Days   310  -5.4488565  2.304839 0.95  -9.96625794
#> 24                 Days   330  -4.8143503  2.304839 0.95  -9.33175179
#> 25                 Days   331  -3.0699116  2.304839 0.95  -7.58731308
#> 26                 Days   332  -0.2721770  2.304839 0.95  -4.78957847
#> 27                 Days   333  -0.2236361  2.304839 0.95  -4.74103755
#> 28                 Days   334   1.0745816  2.304839 0.95  -3.44281982
#> 29                 Days   335 -10.7521652  2.304839 0.95 -15.26956665
#> 30                 Days   337   8.6282652  2.304839 0.95   4.11086369
#> 31                 Days   349   1.1734322  2.304839 0.95  -3.34396930
#> 32                 Days   350   6.6142178  2.304839 0.95   2.09681634
#> 33                 Days   351  -3.0152621  2.304839 0.95  -7.53266355
#> 34                 Days   352   3.5360011  2.304839 0.95  -0.98140035
#> 35                 Days   369   0.8722149  2.304839 0.95  -3.64518660
#> 36                 Days   370   4.8224850  2.304839 0.95   0.30508348
#> 37                 Days   371  -0.9881562  2.304839 0.95  -5.50555769
#> 38                 Days   372   1.2840221  2.304839 0.95  -3.23337939
#> 39    SD (Observations)  <NA>  25.5917957        NA 0.95           NA
#> 40       SD (Intercept)  <NA>  24.7406580        NA 0.95           NA
#> 41            SD (Days)  <NA>   5.9221377        NA 0.95           NA
#> 42 Rho (Intercept~Days)  <NA>   0.2560298        NA 0.95           NA
#>        CI_high          Effects    Group
#> 1  264.7810686            fixed         
#> 2   13.4969780            fixed         
#> 3   25.9169958           random  Subject
#> 4  -16.7402932           random  Subject
#> 5  -15.3019641           random  Subject
#> 6   47.3490645           random  Subject
#> 7   45.9187575           random  Subject
#> 8   32.6980128           random  Subject
#> 9   40.4989535           random  Subject
#> 10  16.4258298           random  Subject
#> 11  23.3247765           random  Subject
#> 12  58.5489317           random  Subject
#> 13  -1.5517837           random  Subject
#> 14  10.5884107           random  Subject
#> 15  28.2363091           random  Subject
#> 16  44.5221231           random  Subject
#> 17  26.9339105           random  Subject
#> 18  -1.9545544           random  Subject
#> 19  24.4654910           random  Subject
#> 20  35.9730370           random  Subject
#> 21  13.7163772           random  Subject
#> 22  -4.1022791           random  Subject
#> 23  -0.9314550           random  Subject
#> 24  -0.2969488           random  Subject
#> 25   1.4474899           random  Subject
#> 26   4.2452245           random  Subject
#> 27   4.2937654           random  Subject
#> 28   5.5919831           random  Subject
#> 29  -6.2347637           random  Subject
#> 30  13.1456666           random  Subject
#> 31   5.6908336           random  Subject
#> 32  11.1316193           random  Subject
#> 33   1.5021394           random  Subject
#> 34   8.0534026           random  Subject
#> 35   5.3896163           random  Subject
#> 36   9.3398864           random  Subject
#> 37   3.5292452           random  Subject
#> 38   5.8014235           random  Subject
#> 39          NA random_variances Residual
#> 40          NA random_variances  Subject
#> 41          NA random_variances  Subject
#> 42          NA random_variances  Subject

Created on 2021-03-04 by the reprex package (v1.0.0)

strengejacke commented 3 years ago

You can look at the above two hidden comments for show case. But I wonder if we really need an "effects" column when showing fixed effects? What else should that be?

IndrajeetPatil commented 3 years ago

Thanks! The examples look terrific.

What else should that be?

I share your misgivings, but, for better or for worse, a lot of users are just going to expect such a column in light of prior experience with broom.mixed. Plus, we don't have much to lose by being explicit about this.

IndrajeetPatil commented 3 years ago

Btw, this is what I see if I try to combine the rows into a dataframe:

library(lme4)
#> Loading required package: Matrix
library(parameters)

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

as.data.frame(model_parameters(fm1, effects = "all"))
#> Error in rbind(deparse.level, ...): numbers of columns of arguments do not match

Created on 2021-03-04 by the reprex package (v1.0.0)

strengejacke commented 3 years ago

probably a temporary issue, please check again now.

IndrajeetPatil commented 3 years ago

Thanks, Daniel. Works great now!

IndrajeetPatil commented 3 years ago

Btw, do you know why there are extra ""s in Group column when converted to a tibble?

library(lme4)
#> Loading required package: Matrix
library(parameters)

options(tibble.width = Inf)

mod <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

df <- model_parameters(mod, effects = "all_pars") 

tibble::as_tibble(df)
#> # A tibble: 6 x 12
#>   Parameter            Level Coefficient    SE    CI CI_low CI_high     t
#>   <chr>                <lgl>       <dbl> <dbl> <dbl>  <dbl>   <dbl> <dbl>
#> 1 (Intercept)          NA        251.     6.82  0.95 238.     265.  36.8 
#> 2 Days                 NA         10.5    1.55  0.95   7.44    13.5  6.77
#> 3 SD (Observations)    NA         25.6   NA     0.95  NA       NA   NA   
#> 4 SD (Intercept)       NA         24.7   NA     0.95  NA       NA   NA   
#> 5 SD (Days)            NA          5.92  NA     0.95  NA       NA   NA   
#> 6 Cor (Intercept~Days) NA          0.256 NA     0.95  NA       NA   NA   
#>   df_error          p Effects          Group     
#>      <int>      <dbl> <chr>            <chr>     
#> 1      174  4.54e-297 fixed            ""        
#> 2      174  1.27e- 11 fixed            ""        
#> 3       NA NA         random_variances "Residual"
#> 4       NA NA         random_variances "Subject" 
#> 5       NA NA         random_variances "Subject" 
#> 6       NA NA         random_variances "Subject"

Created on 2021-03-05 by the reprex package (v1.0.0)

strengejacke commented 3 years ago

Not sure. Will look at it. Btw, I completely revised the way to display random parameters, being in line with the behaviour of Bayesian models. You now have the group_level argument.

strengejacke commented 3 years ago
library(lme4)
#> Loading required package: Matrix
library(parameters)
library(glmmTMB)

data("fish")
data("sleepstudy")

m1 <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)

model_parameters(m1)
#> Parameter   | Coefficient |   SE |           95% CI | t(174) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78] |  36.84 | < .001
#> Days        |       10.47 | 1.55 | [  7.44,  13.50] |   6.77 | < .001

model_parameters(m1, effects = "random", group_level = TRUE)
#> Parameter                  | Coefficient |    SE |           95% CI
#> -------------------------------------------------------------------
#> Subject: (Intercept) [308] |        2.26 | 12.07 | [-21.40,  25.92]
#> Subject: (Intercept) [309] |      -40.40 | 12.07 | [-64.06, -16.74]
#> Subject: (Intercept) [310] |      -38.96 | 12.07 | [-62.62, -15.30]
#> Subject: (Intercept) [330] |       23.69 | 12.07 | [  0.03,  47.35]
#> Subject: (Intercept) [331] |       22.26 | 12.07 | [ -1.40,  45.92]
#> Subject: (Intercept) [332] |        9.04 | 12.07 | [-14.62,  32.70]
#> Subject: (Intercept) [333] |       16.84 | 12.07 | [ -6.82,  40.50]
#> Subject: (Intercept) [334] |       -7.23 | 12.07 | [-30.89,  16.43]
#> Subject: (Intercept) [335] |       -0.33 | 12.07 | [-23.99,  23.32]
#> Subject: (Intercept) [337] |       34.89 | 12.07 | [ 11.23,  58.55]
#> Subject: (Intercept) [349] |      -25.21 | 12.07 | [-48.87,  -1.55]
#> Subject: (Intercept) [350] |      -13.07 | 12.07 | [-36.73,  10.59]
#> Subject: (Intercept) [351] |        4.58 | 12.07 | [-19.08,  28.24]
#> Subject: (Intercept) [352] |       20.86 | 12.07 | [ -2.79,  44.52]
#> Subject: (Intercept) [369] |        3.28 | 12.07 | [-20.38,  26.93]
#> Subject: (Intercept) [370] |      -25.61 | 12.07 | [-49.27,  -1.95]
#> Subject: (Intercept) [371] |        0.81 | 12.07 | [-22.85,  24.47]
#> Subject: (Intercept) [372] |       12.31 | 12.07 | [-11.34,  35.97]
#> Subject: Days [308]        |        9.20 |  2.30 | [  4.68,  13.72]
#> Subject: Days [309]        |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Subject: Days [310]        |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Subject: Days [330]        |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Subject: Days [331]        |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Subject: Days [332]        |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Subject: Days [333]        |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Subject: Days [334]        |        1.07 |  2.30 | [ -3.44,   5.59]
#> Subject: Days [335]        |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Subject: Days [337]        |        8.63 |  2.30 | [  4.11,  13.15]
#> Subject: Days [349]        |        1.17 |  2.30 | [ -3.34,   5.69]
#> Subject: Days [350]        |        6.61 |  2.30 | [  2.10,  11.13]
#> Subject: Days [351]        |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Subject: Days [352]        |        3.54 |  2.30 | [ -0.98,   8.05]
#> Subject: Days [369]        |        0.87 |  2.30 | [ -3.65,   5.39]
#> Subject: Days [370]        |        4.82 |  2.30 | [  0.31,   9.34]
#> Subject: Days [371]        |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Subject: Days [372]        |        1.28 |  2.30 | [ -3.23,   5.80]

model_parameters(m1, effects = "random")
#> Parameter                      | Coefficient
#> --------------------------------------------
#> Residual: SD (Observations)    |       25.59
#> Subject:  SD (Intercept)       |       24.74
#> Subject:  SD (Days)            |        5.92
#> Subject:  Cor (Intercept~Days) |        0.26

model_parameters(m1, effects = "all")
#> # Fixed Effects
#> 
#> Parameter   | Coefficient |   SE |           95% CI | t(174) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78] |  36.84 | < .001
#> Days        |       10.47 | 1.55 | [  7.44,  13.50] |   6.77 | < .001
#> 
#> # Random Effects
#> 
#> Parameter                      | Coefficient
#> --------------------------------------------
#> Residual: SD (Observations)    |       25.59
#> Subject:  SD (Intercept)       |       24.74
#> Subject:  SD (Days)            |        5.92
#> Subject:  Cor (Intercept~Days) |        0.26

model_parameters(m1, effects = "all", group_level = TRUE)
#> # Fixed Effects
#> 
#> Parameter   | Coefficient |   SE |           95% CI | t(174) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |      251.41 | 6.82 | [238.03, 264.78] |  36.84 | < .001
#> Days        |       10.47 | 1.55 | [  7.44,  13.50] |   6.77 | < .001
#> 
#> # Random Effects: Subject
#> 
#> Parameter         | Coefficient |    SE |           95% CI
#> ----------------------------------------------------------
#> (Intercept) [308] |        2.26 | 12.07 | [-21.40,  25.92]
#> (Intercept) [309] |      -40.40 | 12.07 | [-64.06, -16.74]
#> (Intercept) [310] |      -38.96 | 12.07 | [-62.62, -15.30]
#> (Intercept) [330] |       23.69 | 12.07 | [  0.03,  47.35]
#> (Intercept) [331] |       22.26 | 12.07 | [ -1.40,  45.92]
#> (Intercept) [332] |        9.04 | 12.07 | [-14.62,  32.70]
#> (Intercept) [333] |       16.84 | 12.07 | [ -6.82,  40.50]
#> (Intercept) [334] |       -7.23 | 12.07 | [-30.89,  16.43]
#> (Intercept) [335] |       -0.33 | 12.07 | [-23.99,  23.32]
#> (Intercept) [337] |       34.89 | 12.07 | [ 11.23,  58.55]
#> (Intercept) [349] |      -25.21 | 12.07 | [-48.87,  -1.55]
#> (Intercept) [350] |      -13.07 | 12.07 | [-36.73,  10.59]
#> (Intercept) [351] |        4.58 | 12.07 | [-19.08,  28.24]
#> (Intercept) [352] |       20.86 | 12.07 | [ -2.79,  44.52]
#> (Intercept) [369] |        3.28 | 12.07 | [-20.38,  26.93]
#> (Intercept) [370] |      -25.61 | 12.07 | [-49.27,  -1.95]
#> (Intercept) [371] |        0.81 | 12.07 | [-22.85,  24.47]
#> (Intercept) [372] |       12.31 | 12.07 | [-11.34,  35.97]
#> Days [308]        |        9.20 |  2.30 | [  4.68,  13.72]
#> Days [309]        |       -8.62 |  2.30 | [-13.14,  -4.10]
#> Days [310]        |       -5.45 |  2.30 | [ -9.97,  -0.93]
#> Days [330]        |       -4.81 |  2.30 | [ -9.33,  -0.30]
#> Days [331]        |       -3.07 |  2.30 | [ -7.59,   1.45]
#> Days [332]        |       -0.27 |  2.30 | [ -4.79,   4.25]
#> Days [333]        |       -0.22 |  2.30 | [ -4.74,   4.29]
#> Days [334]        |        1.07 |  2.30 | [ -3.44,   5.59]
#> Days [335]        |      -10.75 |  2.30 | [-15.27,  -6.23]
#> Days [337]        |        8.63 |  2.30 | [  4.11,  13.15]
#> Days [349]        |        1.17 |  2.30 | [ -3.34,   5.69]
#> Days [350]        |        6.61 |  2.30 | [  2.10,  11.13]
#> Days [351]        |       -3.02 |  2.30 | [ -7.53,   1.50]
#> Days [352]        |        3.54 |  2.30 | [ -0.98,   8.05]
#> Days [369]        |        0.87 |  2.30 | [ -3.65,   5.39]
#> Days [370]        |        4.82 |  2.30 | [  0.31,   9.34]
#> Days [371]        |       -0.99 |  2.30 | [ -5.51,   3.53]
#> Days [372]        |        1.28 |  2.30 | [ -3.23,   5.80]

m1 <- glmmTMB(
  count ~ child + camper + (1 | persons),
  ziformula = ~ child + camper + (1 | persons),
  data = fish,
  family = truncated_poisson()
)
#> Warning in Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j =
#> integer(0), : 'giveCsparse' has been deprecated; setting 'repr = "T"' for you

#> Warning in Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j =
#> integer(0), : 'giveCsparse' has been deprecated; setting 'repr = "T"' for you

#> Warning in Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j =
#> integer(0), : 'giveCsparse' has been deprecated; setting 'repr = "T"' for you

model_parameters(m1)
#> # Fixed Effects
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Zero-Inflated
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002

model_parameters(m1, effects = "random", group_level = TRUE)
#> # Fixed Effects (persons)
#> 
#> Parameter       | Log-Mean |   SE |         95% CI
#> --------------------------------------------------
#> (Intercept) [1] |    -1.24 | 0.49 | [-2.20, -0.28]
#> (Intercept) [2] |    -0.35 | 0.48 | [-1.28,  0.59]
#> (Intercept) [3] |     0.36 | 0.47 | [-0.56,  1.29]
#> (Intercept) [4] |     1.26 | 0.47 | [ 0.33,  2.18]
#> 
#> # Zero-Inflated (persons)
#> 
#> Parameter       | Log-Odds |   SE |         95% CI
#> --------------------------------------------------
#> (Intercept) [1] |     1.57 | 0.67 | [ 0.26,  2.89]
#> (Intercept) [2] |     0.30 | 0.64 | [-0.95,  1.55]
#> (Intercept) [3] |    -0.32 | 0.65 | [-1.59,  0.96]
#> (Intercept) [4] |    -1.57 | 0.69 | [-2.91, -0.22]

model_parameters(m1, effects = "random")
#> Parameter                   | Log-Mean
#> --------------------------------------
#> Residual: SD (Observations) |     0.16
#> persons:  SD (Intercept)    |     0.93

model_parameters(m1, effects = "all")
#> # Fixed Effects (Count Model)
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Fixed Effects (Zero-Inflated Model)
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002 
#> 
#> # Random Effects (Count Model)
#> 
#> Parameter                   | Coefficient
#> -----------------------------------------
#> Residual: SD (Observations) |        0.16
#> persons:  SD (Intercept)    |        0.93

model_parameters(m1, effects = "all", group_level = TRUE)
#> # Fixed Effects (Count Model)
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Fixed Effects (Zero-Inflated Model)
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002 
#> 
#> # Random Effects (Count Model): persons
#> 
#> Parameter       | Coefficient |   SE |         95% CI
#> -----------------------------------------------------
#> (Intercept) [1] |       -1.24 | 0.49 | [-2.20, -0.28]
#> (Intercept) [2] |       -0.35 | 0.48 | [-1.28,  0.59]
#> (Intercept) [3] |        0.36 | 0.47 | [-0.56,  1.29]
#> (Intercept) [4] |        1.26 | 0.47 | [ 0.33,  2.18]
#> 
#> # Random Effects (Zero-Inflated Model): persons
#> 
#> Parameter       | Log-Odds |   SE |         95% CI
#> --------------------------------------------------
#> (Intercept) [1] |     1.57 | 0.67 | [ 0.26,  2.89]
#> (Intercept) [2] |     0.30 | 0.64 | [-0.95,  1.55]
#> (Intercept) [3] |    -0.32 | 0.65 | [-1.59,  0.96]
#> (Intercept) [4] |    -1.57 | 0.69 | [-2.91, -0.22]

print_html(model_parameters(m1, effects = "all"))
Regression Model
Parameter Coefficient SE 95% CI z p
Fixed Effects (Count Model)
(Intercept) 1.26 0.48 (0.33, 2.19) 2.66 0.008
child -1.14 0.09 (-1.32, -0.96) -12.27 < .001
camper (1) 0.73 0.09 (0.55, 0.92) 7.85 < .001
Fixed Effects (Zero-Inflated Model)
(Intercept) -0.39 0.65 (-1.67, 0.89) -0.60 0.551
child 2.05 0.31 (1.45, 2.66) 6.63 < .001
camper (1) -1.01 0.32 (-1.64, -0.37) -3.12 0.002
Random Effects (Count Model)
Residual: SD (Observations) 0.16
persons: SD (Intercept) 0.93

Created on 2021-03-05 by the reprex package (v1.0.0)

strengejacke commented 3 years ago

ok, there are some minor print-issues for glmmTMB with zero inflation...

strengejacke commented 3 years ago

Btw, do you know why there are extra ""s in Group column when converted to a tibble?

The group column is not allowed to have NA, else split() won't work properly. That's why the NAs are replaced by "".

IndrajeetPatil commented 3 years ago

I see, thanks.

Btw, is effects = "all_pars" no longer allowed? I thought that was a good way to have an output closely aligned with the broom.mixed output.

strengejacke commented 3 years ago
library(parameters)
library(glmmTMB)
data(fish)

m1 <- glmmTMB(
  count ~ child + camper + (1 | persons),
  ziformula = ~ child + camper + (1 | persons),
  data = fish,
  family = truncated_poisson()
)

model_parameters(m1)
#> # Fixed Effects
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Zero-Inflated
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002

model_parameters(m1, effects = "random", group_level = TRUE)
#> # Random Effects: conditional (persons)
#> 
#> Parameter       | Coefficient |   SE |         95% CI
#> -----------------------------------------------------
#> (Intercept) [1] |       -1.24 | 0.49 | [-2.20, -0.28]
#> (Intercept) [2] |       -0.35 | 0.48 | [-1.28,  0.59]
#> (Intercept) [3] |        0.36 | 0.47 | [-0.56,  1.29]
#> (Intercept) [4] |        1.26 | 0.47 | [ 0.33,  2.18]
#> 
#> # Random Effects: zero_inflated (persons)
#> 
#> Parameter       | Coefficient |   SE |         95% CI
#> -----------------------------------------------------
#> (Intercept) [1] |        1.57 | 0.67 | [ 0.26,  2.89]
#> (Intercept) [2] |        0.30 | 0.64 | [-0.95,  1.55]
#> (Intercept) [3] |       -0.32 | 0.65 | [-1.59,  0.96]
#> (Intercept) [4] |       -1.57 | 0.69 | [-2.91, -0.22]

model_parameters(m1, effects = "random")
#> Parameter                   | Coefficient
#> -----------------------------------------
#> Residual: SD (Observations) |        0.16
#> persons:  SD (Intercept)    |        0.93

model_parameters(m1, effects = "all", group_level = TRUE)
#> # Fixed Effects (Count Model)
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Fixed Effects (Zero-Inflated Model)
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002 
#> 
#> # Random Effects (Count Model): persons
#> 
#> Parameter       | Coefficient |   SE |         95% CI
#> -----------------------------------------------------
#> (Intercept) [1] |       -1.24 | 0.49 | [-2.20, -0.28]
#> (Intercept) [2] |       -0.35 | 0.48 | [-1.28,  0.59]
#> (Intercept) [3] |        0.36 | 0.47 | [-0.56,  1.29]
#> (Intercept) [4] |        1.26 | 0.47 | [ 0.33,  2.18]
#> 
#> # Random Effects (Zero-Inflated Model): persons
#> 
#> Parameter       | Coefficient |   SE |         95% CI
#> -----------------------------------------------------
#> (Intercept) [1] |        1.57 | 0.67 | [ 0.26,  2.89]
#> (Intercept) [2] |        0.30 | 0.64 | [-0.95,  1.55]
#> (Intercept) [3] |       -0.32 | 0.65 | [-1.59,  0.96]
#> (Intercept) [4] |       -1.57 | 0.69 | [-2.91, -0.22]

model_parameters(m1, effects = "all")
#> # Fixed Effects (Count Model)
#> 
#> Parameter   | Log-Mean |   SE |         95% CI |      z |      p
#> ----------------------------------------------------------------
#> (Intercept) |     1.26 | 0.48 | [ 0.33,  2.19] |   2.66 | 0.008 
#> child       |    -1.14 | 0.09 | [-1.32, -0.96] | -12.27 | < .001
#> camper [1]  |     0.73 | 0.09 | [ 0.55,  0.92] |   7.85 | < .001
#> 
#> # Fixed Effects (Zero-Inflated Model)
#> 
#> Parameter   | Log-Odds |   SE |         95% CI |     z |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.39 | 0.65 | [-1.67,  0.89] | -0.60 | 0.551 
#> child       |     2.05 | 0.31 | [ 1.45,  2.66] |  6.63 | < .001
#> camper [1]  |    -1.01 | 0.32 | [-1.64, -0.37] | -3.12 | 0.002 
#> 
#> # Random Effects Variances
#> 
#> Parameter                   | Coefficient
#> -----------------------------------------
#> Residual: SD (Observations) |        0.16
#> persons:  SD (Intercept)    |        0.93

Created on 2021-03-05 by the reprex package (v1.0.0)

strengejacke commented 3 years ago

Btw, is effects = "all_pars" no longer allowed? I thought that was a good way to have an output closely aligned with the broom.mixed output.

No, for now, I followed the convention we have for Bayesian models. Not sure if it could make sense to have all together in one output (i.e. fixed effects, random effects (BLUPs), and random effects variances?

strengejacke commented 3 years ago

I thought that was a good way to have an output closely aligned with the broom.mixed output.

This is what effects = "all" returns by default:

library(lme4)
#> Loading required package: Matrix
library(parameters)

mod <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

standardize_names(model_parameters(mod, effects = "all"), style = "broom")
#>                   term level    estimate std.error conf.level   conf.low
#> 1          (Intercept)    NA 251.4051048  6.824597       0.95 238.029141
#> 2                 Days    NA  10.4672860  1.545790       0.95   7.437594
#> 3    SD (Observations)    NA  25.5917957        NA       0.95         NA
#> 4       SD (Intercept)    NA  24.7406580        NA       0.95         NA
#> 5            SD (Days)    NA   5.9221377        NA       0.95         NA
#> 6 Cor (Intercept~Days)    NA   0.2560298        NA       0.95         NA
#>   conf.high statistic df.error       p.value effect    group
#> 1 264.78107 36.838090      174 4.537104e-297  fixed         
#> 2  13.49698  6.771481      174  1.274703e-11  fixed         
#> 3        NA        NA       NA            NA random Residual
#> 4        NA        NA       NA            NA random  Subject
#> 5        NA        NA       NA            NA random  Subject
#> 6        NA        NA       NA            NA random  Subject

broom.mixed::tidy(mod)
#> Registered S3 method overwritten by 'broom.mixed':
#>   method      from 
#>   tidy.gamlss broom
#> # A tibble: 6 x 6
#>   effect   group    term                  estimate std.error statistic
#>   <chr>    <chr>    <chr>                    <dbl>     <dbl>     <dbl>
#> 1 fixed    <NA>     (Intercept)           251.          6.82     36.8 
#> 2 fixed    <NA>     Days                   10.5         1.55      6.77
#> 3 ran_pars Subject  sd__(Intercept)        24.7        NA        NA   
#> 4 ran_pars Subject  cor__(Intercept).Days   0.0656     NA        NA   
#> 5 ran_pars Subject  sd__Days                5.92       NA        NA   
#> 6 ran_pars Residual sd__Observation        25.6        NA        NA

Created on 2021-03-05 by the reprex package (v1.0.0)

IndrajeetPatil commented 3 years ago

That's awesome! That's exactly the behavior I was looking for 😄

IndrajeetPatil commented 3 years ago

Oh, one more thing: What is that empty column level correspond to? It's just NAs in the output.

strengejacke commented 3 years ago

when you set group_level to TRUE. But indeed, could be removed when completely NA.

IndrajeetPatil commented 3 years ago

The group column is not allowed to have NA, else split() won't work properly. That's why the NAs are replaced by "".

Is it possible for us to do whatever {broom.mixed} is doing here so that the group column entries are not surrounded by quotes ""?

library(lme4)
#> Loading required package: Matrix
library(broom.mixed)
library(tibble)
library(parameters)

options(tibble.width = Inf)

mod <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

# `broom.mixed` output --------------------------------

tidy(mod)
#> # A tibble: 6 x 6
#>   effect   group    term                  estimate std.error statistic
#>   <chr>    <chr>    <chr>                    <dbl>     <dbl>     <dbl>
#> 1 fixed    <NA>     (Intercept)           251.          6.82     36.8 
#> 2 fixed    <NA>     Days                   10.5         1.55      6.77
#> 3 ran_pars Subject  sd__(Intercept)        24.7        NA        NA   
#> 4 ran_pars Subject  cor__(Intercept).Days   0.0656     NA        NA   
#> 5 ran_pars Subject  sd__Days                5.92       NA        NA   
#> 6 ran_pars Residual sd__Observation        25.6        NA        NA

# `parameters` output ---------------------------------
# (with further modications to match `broom` conventions)

model_parameters(mod, effects = "all") %>%
  standardize_names(style = "broom") %>%
  as_tibble()
#> # A tibble: 6 x 11
#>   term                          estimate std.error conf.level conf.low conf.high
#>   <chr>                            <dbl>     <dbl>      <dbl>    <dbl>     <dbl>
#> 1 (Intercept)                   251.          6.82       0.95   238.       265. 
#> 2 Days                           10.5         1.55       0.95     7.42      13.5
#> 3 SD (Intercept)                 24.7        NA          0.95    NA         NA  
#> 4 SD (Days)                       5.92       NA          0.95    NA         NA  
#> 5 Cor (Intercept~Days: Subject)   0.0656     NA          0.95    NA         NA  
#> 6 SD (Observations)              25.6        NA          0.95    NA         NA  
#>   statistic df.error   p.value effect group     
#>       <dbl>    <int>     <dbl> <chr>  <chr>     
#> 1     36.8       174  4.37e-84 fixed  ""        
#> 2      6.77      174  1.88e-10 fixed  ""        
#> 3     NA          NA NA        random "Subject" 
#> 4     NA          NA NA        random "Subject" 
#> 5     NA          NA NA        random "Subject" 
#> 6     NA          NA NA        random "Residual"

Created on 2021-11-03 by the reprex package (v2.0.1)

strengejacke commented 3 years ago

The group column is not surrounded by quotes.

IndrajeetPatil commented 3 years ago

Thanks for commenting in that issue. Sorry for not checking the as.data.frame output before.

strengejacke commented 3 years ago

Just saw we had this discussion before: https://github.com/easystats/parameters/issues/422#issuecomment-791216565

:-D

bwiernik commented 3 years ago

Lol. Yes, that is just tibble printing aids to prevent misreading of values by users