criteria — quick reference (bundled with gretl) Function: matrix criteria(scalar ess, int n, int k, bool quiet[0]) Computes the Akaike information criterion (AIC), Bayesian information criterion (BIC), Hannan–Quinn criterion (HQC) and corrected AIC (AICc) from the residual sum of squares (ess), number of observations (n) and number of estimated coefficients (k). Returns a row vector with four values: AIC, BIC, HQC and AICc. Use quiet=1 to suppress printed results. Example after estimating a gretl model: matrix cr = criteria($ess, $T, $ncoeff) Source: https://github.com/gretl-project/gretl/blob/master/share/functions/criteria.gfn