pastas.stats.metrics.aic ======================== .. py:function:: pastas.stats.metrics.aic(obs: pandas.Series | None = None, sim: pandas.Series | None = None, res: pandas.Series | None = None, missing: str = 'drop', nparam: int = 1) -> float Compute the Akaike Information Criterium (AIC). :param obs: Series with the observed values. :type obs: pandas.Series, optional :param sim: The Series with the simulated values. :type sim: pandas.Series, optional :param res: The Series with the residual values. If time series for the residuals are provided, the sim and obs arguments are ignored. Note that the residuals must be computed as `obs - sim` here. :type res: pandas.Series, optional :param nparam: number of calibrated parameters. :type nparam: int, optional :param missing: string with the rule to deal with missing values. Only "drop" is supported now. :type missing: str, optional .. rubric:: Notes The Akaike Information Criterium (AIC) :cite:p:`akaike_new_1974` is computed as follows: .. math:: \text{AIC} = -2 log(L) + 2 nparam where :math:`n_{param}` is the number of calibration parameters and L is the likelihood function for the model. In the case of ordinary least squares: .. math:: log(L) = - (nobs / 2) * log(RSS / -nobs) where RSS denotes the residual sum of squares and nobs the number of observations. .. !! processed by numpydoc !!