residuals.gam              package:mgcv              R Documentation

_G_e_n_e_r_a_l_i_z_e_d _A_d_d_i_t_i_v_e _M_o_d_e_l _r_e_s_i_d_u_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Returns residuals for a fitted 'gam' model object. Pearson,
     deviance, working and response residuals are available.

_U_s_a_g_e:

     residuals.gam(object, type = c("deviance", "pearson","scaled.pearson", "working", "response"),...)

_A_r_g_u_m_e_n_t_s:

  object: a 'gam' fitted model object. 

    type: the type of residuals wanted. 

     ...: other arguments.

_D_e_t_a_i_l_s:

     Response residuals are the raw residuals (data minus fitted
     values). Scaled Pearson residuals are raw residuals divided by the
     standard deviation of the data according to the model mean
     variance relationship and estimated scale parameter. Pearson
     residuals are the same, but multiplied by the square root  of the
     scale parameter (so they are independent of the scale parameter):
     ((y-m)/V(m)^0.5, where  y is data m  is model fitted value and V
     is model mean-variance relationship.). Both are provided since not
     all texts  agree on the definition of Pearson residuals. Deviance
     residuals simply return the deviance residuals defined by the
     model family. Working residuals are the residuals returned from
     model fitting at convergence.

     There is  a special function for 'gam' objects because of a bug in
     the calculation of Pearson residuals in some earlier versions of
     'residual.glm'.

_V_a_l_u_e:

     An array of residuals.

_A_u_t_h_o_r(_s):

     Simon N. Wood simon.wood@r-project.org

_S_e_e _A_l_s_o:

     'gam'

