library("gamlss2")
## basic formula
<- y ~ x1 + x2 + log(x3)
f response_name(f)
[1] "y"
## formula with multiple responses
<- y1 | y2 | y3 ~ x1 + s(x2) + x3 + te(log(x3), x4) | x2 + ti(x5)
f response_name(f)
[1] "y1" "y2" "y3"
## list of formulas
<- list(
f ~ x1 + s(x2) + x3 + te(log(x3), x4),
y1 ~ x2 + sqrt(x5),
y2 ~ z2 + x1 + exp(x3) + s(x10)
y3
)response_name(f)
[1] "y1" "y2" "y3"