Generalised Additive Mixed Model: Summary table differences between mgcv and brms

If you run an identical Generalised Additive Mixed Model with the mgcv vs. brms package in R, the summary tables for the factor smooth terms (e.g., te(..., bs='fs', ...) are different. For example, the generic model could be:

gam1 <-gam(DV ~
    ExpTrialOrder +
    FactorA +
    s(CovariateM) +
    s(ExpTrialOrder, Participant, bs='fs', m=1),
    ...)
brms_gam1 <- brm(DV ~
    ExpTrialOrder +
    FactorA +
    s(CovariateM) +
    s(ExpTrialOrder, Participant, bs='fs', m=1),
    ...)

For the traditional GAMM, the s(ExpTrialOrder, Participant, bs='fs', m=1) part of the table could look like this:

Approximate significance of smooth terms:
                                 edf  Ref.df     F p-value
s(ExpTrialOrder,Participant) 134.282 368.000 59.88  <2e-16

while the output from brms could look like this:

Smooth Terms:
                                 Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sds(sExpTrialOrderParticipant_1)     5.91      0.61     4.77     7.13 1.00     2333     4650
sds(sExpTrialOrderParticipant_2)   139.72     15.71   112.74   174.20 1.00      634     1720

How should we read the summary table from brms? Are the two components (i.e., _1 and _2) smooths for the two components of the s(); that is, Estimate == edf, for ExpTrialOrder and Participant, respectively?

  • Operating System: macOS
  • brms Version: 2.17.0

Thanks!

2 Likes