Is it possible to have brms do the following model:
in pseudocode:
y ~ N(exp(log_mu), exp(log_sigma))
log_mu = X * Beta
log_sigma = alpha0 + alpha1 * log_mu
clearly the log link on the mean and variance is easy and well documented but I wasn’t sure if I was able to utilize the mean in predicting the variance.
Error: The following variables can neither be found in 'data' nor in 'data2':
'eta'
In addition: Warning message:
Arguments '...' and 'flist' in nlf() will be reworked at some point. Please avoid using them if possible.
You need to specify nl = TRUE inside bf(), that is bf(size | trunc(lb=0) ~ eta, nl = TRUE). Otherwise, brms will parse this formula as a linear formula and thus expects eta to be data.