Hello (my very first question in this forum :)),
I have a data-set about an experiment, where the influence of time (t) on y is not linear (its about growth). For every individual, the data is observed with and without Treatment.
The model I would like to fit is:
y ~ Treatment + (1|individual) + s(t, by = Treatment) + s(t, by = individual) [1]
as I intend to capture the individual-specific deviations from the population parameter by ‘random’-effects. Within the frequentist (GAM) framework, columns of the design matrix X need to be removed:
- one level of Treatment from s(t, by = Treatment)
- one level of individual from s(t, by = individual)
I wonder how the brms framework deals with this as the summary() reports estimates for s(t) for every level of Treatment (X,Y) and individual (A,B,C, and D) as this (reducing the output to the relevant part):
Smooth Terms:
sds(stTreatmentY)
sds(stTreatmentX)
sds(stindividualA)
sds(stindividualB)
sds(stindividualC)
sds(stindividualD)
Group-Level Effects:
~individual (Number of levels: 4)
Population-Level Effects:
Intercept
TreatmentX
st:TreatmentY
st:TreatmentX
st:individualA
st:individualB
st:individualC
st:individualD
I fear that my model equation (as it is) makes not sense and my guess is that I am probably not the first who is looking to capture a Treatment-effect on population-level using splines with random-effects for the individual deviations?
- Operating System: macOS Big Sur 11.4
- brms Version: 2.15.0
Cheers