stat.anova               package:stats               R Documentation

_G_L_M _A_n_o_v_a _S_t_a_t_i_s_t_i_c_s

_D_e_s_c_r_i_p_t_i_o_n:

     This is a utility function, used in 'lm' and 'glm' methods for
     'anova(..., test != NULL)' and should not be used by the average
     user.

_U_s_a_g_e:

     stat.anova(table, test = c("Chisq", "F", "Cp"), scale, df.scale, n)

_A_r_g_u_m_e_n_t_s:

   table: numeric matrix as results from 'anova.glm(..., test=NULL)'.

    test: a character string, matching one of '"Chisq"', '"F"' or
          '"Cp"'.

   scale: a residual mean square or other scale estimate to be used as
          the denominator in an F test.

df.scale: degrees of freedom corresponding to 'scale'.

       n: number of observations.

_V_a_l_u_e:

     A matrix which is the original 'table', augmented by a column of
     test statistics, depending on the 'test' argument.

_R_e_f_e_r_e_n_c_e_s:

     Hastie, T. J. and Pregibon, D. (1992) _Generalized linear models._
     Chapter 6 of _Statistical Models in S_ eds J. M. Chambers and T.
     J. Hastie, Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'anova.lm', 'anova.glm'.

_E_x_a_m_p_l_e_s:

     ##-- Continued from '?glm':

     print(ag <- anova(glm.D93))
     stat.anova(ag$table, test = "Cp",
                scale = sum(resid(glm.D93, "pearson")^2)/4, df = 4, n = 9)

