- Operating System: Windows 10
- brms Version:

Hi,

I am currently trying to fit a multilevel non-linear model, which uses paired, repeated measures data (data of patients before and after a medical procedure, in each case several measurements per patient are taken).

I read some of the docs provided on brms, but still have some doubts as to whether I am getting the parameter declaration right.

I am fitting the following model:

fit<- brm(

bf(LDL ~ 15 + (alpha-15) / (1 + exp ((gamma-Time) / delta)),

alpha ~ 1 + (1|Sample)+(1|Cat),

gamma ~ 1 + (1|Sample)+(1|Cat),

delta ~ 1 + (1|Sample)+(1|Cat),

nl = TRUE),

data = ldlData, family = gaussian(),

chains = 2,

iter=5000,

warmup = 1000,

cores = getOption(“mc.cores”,1L),

control = list(adapt_delta = 0.999)

)

As seen from the code, the parameters are alpha, gamma, and delta.

Let us take alpha, for example:

alpha ~ 1 + (1|Sample)+(1|Cat) (1)

In this case, does this mean that alpha has a fixed effect, represented by the first 1 in the expression and two independent group effects (alpha varies per Sample and per Category - Before/After procedure).

In addition, if I want to write a model, in which Sample is influenced by Category,

I think I should use

alpha ~ 1 + (1|Cat/Sample) = 1 + (1|Cat) + (1|Cat:Sample) (2)

In case two is correct, can someone confirm what exactly the intuition behind it is -

the way I see it, it says that Cat contributes to a group effect for the whole population, and also influences the group effect per Sample in a specific Category.

Is this correct?

Thanks.