# What is the formula for AICc for least square fitting with multiple data types and variables?

If I have a system of nonlinear ordinary differential equations \begin{align} x' &= f(x,y,Q),\\ y' &= g(x,y,Q), \end{align} where $$Q$$ is the vector containing model parameters. And I fit it to time series data: $$\{x_i\}_{i=1...N}$$ and $$\{y_j\}_{j=1...M}$$ using least square with $$RSS = \sum_{i=1}^N (x(t_i) - x_i)^2+ \sum_{j=1}^M(y(t_j)-y_j)^2.$$ My AIC is given by $$AIC = 2k + (N+M)\ln(RSS),$$ where $$k$$ is the number of model parameters. My questions are:

1. With the given assumption of the model fitting, is the AIC formula appropriate?
2. If I want to correct for small sample size, is the following AICc formula correct? $$AICc = AIC + \frac{2k^2 + 2k}{n-k-1}.$$ In particular, I am concerned about what would happen if $$\{x_i\}_{i=1...N}$$ and $$\{y_j\}_{j=1...M}$$ are correlated nonlinearly. Is this nonlinear correlation accounted for by the nonlinear ode model without having to modify the AIC and AICc equations? If you can provide some references, that would be much appreciated.
• What is $n$ in your proposed formula for AICc? Commented Oct 14, 2021 at 20:22
• That would be N+M the total number of data points. Commented Oct 15, 2021 at 18:29

I do not know the answer to your question, nor whether a clear-cut answer exist. Much will depend, I conjecture, on the form of the functions $$f$$ and $$g$$. In short, not all parameters are created equal. Let me explain what I mean.
Consider the simplest possible state-space model in which you have, $$\begin{eqnarray} \mu_t &=& \mu_{t-1} + \nu_t \\\\ y_t &=& \mu_t + \epsilon_t \end{eqnarray}$$ where $$\nu_t$$ and $$\epsilon_t$$ are iid, mutually independent noises with variances respectively $$\sigma^2_\nu$$ and $$\sigma^2_\epsilon$$. These variances are the only parameters present, $$y_t$$ are the observations. Given the parameters, it is a simple matter to compute values ot the state $$\mu_t$$ (for instance, using the Kalman filter).
It is easy to show that if $$\sigma^2_\epsilon/\sigma^2_\nu = 0$$, the best unbiased estimates (in terms of MSE) of $$\mu_t$$ are $$\mu_t=y_t$$. Basically, you totally "believe" your observations and fit one value each time. If however $$\sigma^2_\nu/\sigma^2_\epsilon = 0$$, you are in the case of a constant state $$\mu_t$$ which would be fitted as the average of all observations $$y_t$$.
Seemingly, you have two parameters in both cases (the variances), yet in the first case we have sort of a saturated fit while in the second we very parsimoniously fit a single constant to the whole trajectory of $$\mu_t$$. For $$0 < \sigma^2_\nu/\sigma^2_\epsilon < \infty$$ you have all intermediate cases between the two extremes.
In this very simple case, the estimates of the state can be written as $$\boldsymbol{\mu} = \boldsymbol{Hy}$$ for a certain "hat" matrix $$\boldsymbol{H}$$ and you might count "equivalent parameters", as the trace of that matrix. What is clear is that you would not want to count two parameters in all cases, for the AIC would always favour the saturated model.