I am fitting a nonlinear mixed-effects model with the following formula:

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

where LDL is a strictly positive value.

The code for the model can be found below:

fit_model <- function(Data){

fit<- brm(

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

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

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

delta ~ 1,

nl = TRUE),

prior = c(

prior(normal(1500, 30), class=“b”,nlpar = “alpha”),

prior(normal(2.5,0.07), class=“b”, nlpar = “gamma”),

prior(normal(0.2,0.05), class=“b”, lb=0, ub=0.5, nlpar = “delta”),

prior(student_t(3, 0, 10), class=“sigma”),

prior(student_t(3, 0, 10), class=“sd”, nlpar=“alpha”),

prior(student_t(3, 0, 10), class=“sd”, nlpar=“gamma”),

prior(normal(0.4,0.03 ), class=“sd”, group=“Sample”, coef=“Intercept”, nlpar=“gamma”),

prior(normal(300,10), class=“sd”, group=“Sample”, coef=“Intercept”, nlpar=“alpha”),

prior(normal(0.2,0.15), class=“sd”, group=“Cat”, coef=“Intercept”, nlpar=“gamma”),

prior(normal(17,6), class=“sd”, group=“Cat”, coef=“Intercept”, nlpar=“alpha”)),

data = Data, family = gaussian(),

chains = 3,

iter=3000,

warmup = 1000,

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

thin = 1,

control = list(adapt_delta = 0.99999, stepsize=0.00001, max_treedepth=15)

)return(fit)

}

First I fitted the model, using

family=gaussian()

The predictions of this model were quite close to the actual values.

However, I had 100 influential points, with a data set of 368 data points.

So it was pointed out to me that I should change the family, as the model was badly misspecified.

I played around with the family and in the end found the one which works OK:

family= Gamma(link=“log”).

The predictions which I got, however, were slightly off.

From all the parameters which needed to be estimated, I got the roughly the same Est. Value and Est. Error for all estimated fixed and random effects, apart from the fixed effect delta.

I run my chains for a really long time and the Est Value I got for delta was

delta=0.27

However, based on the misspecified model, I know that the value of

delta=0.2 (Est Error sd= 0.00, which I guess means something really small?),

considering all other estimated values are quite similar to the previous model, would result in predicted values which are quite close to the real ones.

Now, considering that I have this knowledge about the value of delta, is it acceptable to set delta=0.2 in the initial formula for the model, or is this considered a very poor practice when fitting Bayesian models?