def AIC(N, rho, k):
    'Akaike Information Criterion\n\n    :param rho: rho at order k\n    :param N: sample size\n    :param k: AR order.\n\n    If k is the AR order and N the size of the sample, then Akaike criterion is\n\n    .. math:: AIC(k) = \\log(\\rho_k) + 2\\frac{k+1}{N}\n\n    ::\n\n        AIC(64, [0.5,0.3,0.2], [1,2,3])\n\n    :validation: double checked versus octave.\n    '
    from numpy import log, array
    res = ((N * log(array(rho))) + (2.0 * (array(k) + 1)))
    return res
Akaike Information Criterion

:param rho: rho at order k
:param N: sample size
:param k: AR order.

If k is the AR order and N the size of the sample, then Akaike criterion is

.. math:: AIC(k) = \log(\rho_k) + 2\frac{k+1}{N}

::

    AIC(64, [0.5,0.3,0.2], [1,2,3])

:validation: double checked versus octave.
def AIC(N, rho, k):
    'Akaike Information Criterion\n\n    :param rho: rho at order k\n    :param N: sample size\n    :param k: AR order.\n\n    If k is the AR order and N the size of the sample, then Akaike criterion is\n\n    .. math:: AIC(k) = \\log(\\rho_k) + 2\\frac{k+1}{N}\n\n    ::\n\n        AIC(64, [0.5,0.3,0.2], [1,2,3])\n\n    :validation: double checked versus octave.\n    '
    from numpy import log, array
    res = ((N * log(array(rho))) + (2.0 * (array(k) + 1)))
    return res