extractAIC               package:stats               R Documentation

_E_x_t_r_a_c_t _A_I_C _f_r_o_m _a _F_i_t_t_e_d _M_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     Computes the (generalized) Akaike *A*n *I*nformation *C*riterion
     for a fitted parametric model.

_U_s_a_g_e:

     extractAIC(fit, scale, k = 2, ...)  

_A_r_g_u_m_e_n_t_s:

     fit: fitted model, usually the result of a fitter like 'lm'.

   scale: optional numeric specifying the scale parameter of the model,
          see 'scale' in 'step'. 

       k: numeric specifying the "weight" of the _equivalent degrees of
          freedom_ (=: 'edf') part in the AIC formula.

     ...: further arguments (currently unused in base R).

_D_e_t_a_i_l_s:

     This is a generic function, with methods in base R for '"aov"',
     '"coxph"', '"glm"', '"lm"', '"negbin"' and '"survreg"' classes.

     The criterion used is 

                     AIC = - 2*log L +  k * edf,

     where L is the likelihood and 'edf' the equivalent degrees of
     freedom (i.e., the number of parameters for usual parametric
     models) of 'fit'.

     For linear models with unknown scale (i.e., for 'lm' and 'aov'),
     -2log L is computed from the _deviance_ and uses a different
     additive constant to 'AIC'.

     'k = 2' corresponds to the traditional AIC, using 'k = log(n)'
     provides the BIC (Bayes IC) instead.

     For further information, particularly about 'scale', see 'step'.

_V_a_l_u_e:

     A numeric vector of length 2, giving

     edf: the "*e*quivalent *d*egrees of *f*reedom" of the fitted model
          'fit'.

     AIC: the (generalized) Akaike Information Criterion for 'fit'.

_N_o_t_e:

     These functions are used in 'add1', 'drop1' and 'step' and that
     may be their main use.

_A_u_t_h_o_r(_s):

     B. D. Ripley

_R_e_f_e_r_e_n_c_e_s:

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S._ New York: Springer (4th ed).

_S_e_e _A_l_s_o:

     'AIC', 'deviance', 'add1', 'step'

_E_x_a_m_p_l_e_s:

     example(glm)
     extractAIC(glm.D93)#>>  5  15.129

