Hi all,
I’m trying to estimate a system of equations as a multivariate nonlinear model, as part of an attempt to estimate an econometric model. However, I keep running into the following error:
Error: The following priors do not correspond to any model parameter:
b_log(z1)_E1 ~ normal(0, 1)
<upper=0> b_log(z1)_E2 ~ normal(-0.09, 0.04)
Proceeding to list all the priors in my model in this manner.
My code is below:
z1_fm <- formula(log(z1) ~ E1 + E2*((log(z2) + log(z3)) + E3*log(y1) + (1-E3)*log(z5) + ((E2)/(-1))*log(z6))
x1_fm <- formula(log(x1) ~ W1 + W2*(log(x2) - log(x3))+ W3*log(x4)+(1-W3)*log(x5)+W4*(x6))
y1_fm <- formula(log(y1) ~ P1 + P2*(log(x1) - log(y3)) -1*P2*log(y4))
bf_x1 <- brmsformula(x1_fm, nonlinear = W1+W2+W3+W4~1, nl = TRUE)
bf_y1 <- brmsformula(y1_fm, nonlinear = P1+P2~1, nl = TRUE)
bf_z1 <- brmsformula(z1_fm, nonlinear = E1+E2+E3~1, nl = TRUE)
priors_xyz <- prior(normal(0,1),nlpar = E1, resp = "log(z1)") + prior(normal(-0.09,0.04),nlpar = E2, ub = 0, resp = "log(z1)") + prior(normal(0.30,0.08),nlpar = E3, ub = 1, lb = 0, resp = "log(z1)") + prior(normal(0,1),nlpar = W1, resp = "log(x1)") + prior(normal(-0.1,0.05),nlpar = W2, ub = 0, resp = "log(x1)") + prior(normal(0.5,0,2),nlpar = W3, ub = 1, lb = 0, resp = "log(x1)")+ prior(normal(-0.002,0.001),nlpar = W4, ub = 0, resp = "log(x1)") + prior(normal(0,1),nlpar = P1, resp = "log(y1)") + prior(normal(-0.1,0.05),nlpar = P2, ub = 0, resp = "log(y1)")
eq_wpe <- brm(bf_x1 + bf_y1 + bf_z1 + set_rescor(rescor = TRUE), prior = priors_xyz, data = DATA_EXTRACT, control = list(adapt_delta = 0.90), cores = 4)
My ultimate aim is to have some parameters shared across the equations (so the -1 in the first equation at ((E2)/(-1))*log(z6)) would eventually be replaced by W2) but I thought I would try and troubleshoot without the added complication of sharing parameters first- one step at a time and all.
I would greatly appreciate any advice or support on where I may be going wrong and what is causing this error!