def AIC(loglik, k):
    """ Akaike Information Criterion

    Parameters
    ----------
    loglik : float
        Log likelihood
    k : int
        Parameters estimated

    Returns
    -------
    float
        AIC, the smaller the better
    """
    return -2 * loglik + 2 * k