Skip to contents

The coefficients of each linear predictor, as a named list keyed by distributional parameter (and by response on a multivariate fit), each entry named by DESIGN COLUMN: fixef_by_dpar(fit)$sigma, fixef_by_dpar(fit)$mu[["(Intercept)"]].

Usage

fixef_by_dpar(object)

Arguments

object

A frmtmb_fit.

Value

A named list of coefficient vectors, one per linear predictor.

Details

This is the shape fixef() returned before frmtmb took brms's summary matrix. It is kept because nothing else has it: fixef() names its rows as brms does and flattens every predictor into one table, and fixef(flatten = TRUE) is one vector in the confint() spelling. A model with several linear predictors (a mixture, a multivariate response, a nonlinear body) is the case this reads cleanly.

It carries ESTIMATES only. For a standard error or an interval use fixef(), whose rows are the same coefficients under brms's names.

Examples

set.seed(1)
dd <- data.frame(x = rnorm(100))
dd$y <- rnorm(100, 1 + 0.5 * dd$x, exp(0.2 + 0.1 * dd$x))
fit <- frm(bf(y ~ x, sigma ~ x) + gaussian(), data = dd)

# one entry per distributional parameter, named by design column
fixef_by_dpar(fit)
#> $mu
#> (Intercept)           x 
#>   0.9540022   0.5184330 
#> 
#> $sigma
#> (Intercept)           x 
#>   0.1515421   0.1026323 
#> 
exp(fixef_by_dpar(fit)$sigma[["(Intercept)"]])
#> [1] 1.163627

# the same coefficients under brms's names, with their errors
fixef(fit)
#>                  Estimate  Est.Error        Q2.5     Q97.5
#> Intercept       0.9540022 0.11693544  0.72481301 1.1831915
#> sigma_Intercept 0.1515421 0.07154043  0.01132541 0.2917587
#> x               0.5184330 0.13753442  0.24887050 0.7879955
#> sigma_x         0.1026323 0.09977149 -0.09291626 0.2981808