ACF.lme                 package:nlme                 R Documentation

_A_u_t_o_c_o_r_r_e_l_a_t_i_o_n _F_u_n_c_t_i_o_n _f_o_r _l_m_e _R_e_s_i_d_u_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     This method function calculates the empirical autocorrelation
     function for the within-group residuals from an 'lme' fit. The
     autocorrelation values are calculated using pairs of residuals
     within the innermost group level. The autocorrelation function is 
     useful for investigating serial correlation models for equally
     spaced data.

_U_s_a_g_e:

     ## S3 method for class 'lme':
     ACF(object, maxLag, resType, ...)

_A_r_g_u_m_e_n_t_s:

  object: an object inheriting from class 'lme', representing a fitted
          linear mixed-effects model.

  maxLag: an optional integer giving the maximum lag for which the
          autocorrelation should be calculated. Defaults to maximum lag
          in the within-group residuals.

 resType: an optional character string specifying the type of residuals
          to be used. If '"response"', the "raw" residuals (observed -
          fitted) are used; else, if '"pearson"', the standardized
          residuals (raw residuals divided by the corresponding
          standard errors) are used; else, if '"normalized"', the
          normalized residuals (standardized residuals pre-multiplied
          by the inverse square-root factor of the estimated error
          correlation matrix) are used. Partial matching of arguments
          is used, so only the first character needs to be provided.
          Defaults to '"pearson"'.

     ...: some methods for this generic require additional arguments -
          not used.

_V_a_l_u_e:

     a data frame with columns 'lag' and 'ACF' representing,
     respectively, the lag between residuals within a pair and the
     corresponding empirical autocorrelation. The returned value
     inherits from class 'ACF'.

_A_u_t_h_o_r(_s):

     Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates
     bates@stat.wisc.edu

_R_e_f_e_r_e_n_c_e_s:

     Box, G.E.P., Jenkins, G.M., and Reinsel G.C. (1994) "Time Series
     Analysis: Forecasting and Control", 3rd Edition, Holden-Day.

_S_e_e _A_l_s_o:

     'ACF.gls', 'plot.ACF'

_E_x_a_m_p_l_e_s:

     data(Ovary)
     fm1 <- lme(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
                random = ~ sin(2*pi*Time) | Mare)
     ACF(fm1, maxLag = 11)

