residuals-methods           package:fGarch           R Documentation

_E_x_t_r_a_c_t _G_A_R_C_H _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:

     Extracts residuals from a fitted GARCH object.

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

     ## S4 method for signature 'fGARCH':
     residuals(object, standardize = FALSE)

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

  object: an object of class '"fGARCH"' as returned from the function
          'garchFit'. 

standardize: a logical flag, should the residuals be standardized? 

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

     The function extracts the '@residuals' slot from an object of
     class '"fGARCH"' as returned by the function 'garchFit'.

     The class of the returned value depends on the input to the
     function 'garchFit' who created the object. The returned value is
     always of the same class as the input object to the argument
     'data' in the function 'garchFit', i.e. if you fit a
     '"timeSeries"' object, you will get back from  the function
     'fitted' also a '"timeSeries"' object,  if you fit an object of
     class '"zoo"', you will get back  again a '"zoo"' object. The same
     holds for a '"numeric"' vector, for a '"data.frame"', and for
     objects of class '"ts", "mts"'.

     In contrast, the slot itself returns independent of the class  of
     the data input always a numceric vector, i.e. the function  call
     r'slot(object, "fitted")' will return a numeric vector.

_M_e_t_h_o_d_s:



     _o_b_j_e_c_t = "_A_N_Y" Generic function

     _o_b_j_e_c_t = "_f_G_A_R_C_H" Extractor function for residual from an object
          of  class '"fGARCH"'.


_N_o_t_e:

     'residuals' is a generic function which extracts residual values 
     from objects returned by modeling functions.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## Swiss Pension func Index -
        x = as.timeSeries(data(LPP2005REC))
       
     ## garchFit
        fit = garchFit(LPP40 ~ garch(1, 1), data = 100*x, trace = FALSE)
        fit
        
     ## residuals - 
        res = residuals(fit)
        head(res)
        class(res)
        
     ## slot - 
        res = slot(fit, "residuals")
        head(res)

