I know there are already [two questions](http://stats.stackexchange.com/search?q=multivariate+nonlinear+regression+) on this topic, but neither has an answer.  

I have a set of $N$ experiments. For each experiment, denoted by a vector of predictors $\mathbf{x}$, I measure $m$ values $y(f_1)\dots y(f_m)$ of a quantity $y$ at increasing frequency values. In other words, the result of each experiment is not a scalar but a function of frequency, measured at $m$ different frequencies. I thus have a total of $N\times m $ measured values of $y$.

I have a model for the results of this experiment, which is given by a computer code $g(f, \mathbf{x}, \boldsymbol{\theta})$, where the  $\boldsymbol{\theta}$ are calibration parameters. The setting is very similar to [this question](http://stats.stackexchange.com/questions/264598/modern-approaches-to-nonlinear-regression-which-are-available-in-r), with the added complication that now the output of the code is multivariate (a vector, instead than a scalar).

I would like to calibrate my code. I think I could use multivariate multiple nonlinear   least squares . However, I'm only familiar with multiple nonlinear least squares (single output). How do you calibrate on all outputs at once? Also, given a specific experiment, I'm not sure that errors at different frequencies are independent. As a matter of fact, based on past investigations I expect that (**before calibration**) the code results will match the trend in frequency of the measurements, but not the absolute values. What should I do in this case?