# One regression equation with multiple error terms

**URL:** <https://discourse.mc-stan.org/t/one-regression-equation-with-multiple-error-terms/40867>\
**Category:** Modeling\
**Tags:** fitting-issues, specification\
**Created:** [January 23, 2026, 8:58pm UTC](https://discourse.mc-stan.org/t/one-regression-equation-with-multiple-error-terms/40867 "2026-01-23T20:58:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arne\_Henningsen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/arne_henningsen/32/18286_2.png) [@Arne\_Henningsen](https://discourse.mc-stan.org/u/Arne_Henningsen)\
**Post date:** [January 23, 2026, 8:58pm UTC](https://discourse.mc-stan.org/t/one-regression-equation-with-multiple-error-terms/40867/1 "2026-01-23T20:58:25Z")

</div>

We would like to estimate a non-linear regression model, e.g.:  
\log y = f( x\_1 , x\_2, \beta ) + u,  
where y, x\_1, and x\_2 are (observed) variables, \beta is a vector of unknown parameters (to be estimated), f( \cdot ) is a non-linear function, and u is a random error term (representing the role of unobserved variables in the regression model) that can be assumed to follow a normal distribution with zero mean. However, our domain knowledge indicates that the error term u is very likely substantially correlated with the right-hand side variables x\_1 and x\_2. This correlation would result in largely biased and inconsistent estimates in linear regression models estimated by OLS and I guess that this problem also occurs in non-linear regression models estimated by Bayesian methods.  
Therefore, we thought about the following specification of the regression model that aligns with what we assume could be the ‘true’ data generating process:  
\log y = f( x\_1 \cdot e^{u\_1}, x\_2 \cdot e^{u\_2}, \beta ),  
where e is the Euler number and u\_1 and u\_2 are two random error terms that can be assumed to follow a bivariate normal distribution. Two approaches for estimating this model specification came to our mind:

1. Modelling u\_1 and u\_2 as latent variables (that follow a bivariate normal distribution with both of the mean values equal to zero) and adding a third error term u to the regression equation (as in the first equation above) that is assumed follow a normal distribution with zero mean and a tiny standard deviation so that this third error term is always approximately zero.
2. Solving the regression equation for u\_2, i.e., u\_2 = g( y, x\_1, x\_2, u\_1, \beta ), modeling u\_1 as a latent variable, calculating u\_2 as g(\cdot), and calculating the value of the (log) likelihood function by applying the density function of a bivariate normal distribution to u\_1 and u\_2.

What do you think about these two approaches? Do you have any concerns? Do you have suggestions for other approaches to estimate a single regression equation with two or more error terms or for other approaches to address a potential correlation between the (unknown) error term and right-hand side variables?

Note: y is always strictly positive, x\_1 and x\_2 are always non-negative, and x\_1 + x\_2 is always strictly positive. There is a notable number of observations with x\_1 being zero or having very small values and a notable number of observations with x\_2 being zero or having very small values so that both the variance of u\_1 and the variance of u\_2 should be (statistically) identifiable.
