gls fit. If a grouping variable is
specified in form, the autocorrelation values
are calculated using pairs of residuals within the same group;
otherwise all possible residual pairs are used. The autocorrelation
function is useful for investigating serial correlation models for
equally spaced data.## S3 method for class 'gls':
ACF(object, maxLag, resType, form, na.action, \dots)gls, representing
a generalized least squares fitted model."response", the "raw" residuals
(observed - fitted) are used; else, if "pearson", the
standardized residuals (raw residuals divided by the c~ t, or
~ t | g, specifying a time covariate t and, optionally, a
grouping factor g. The time covariate must be integer
valued. When a grouping factNAs. The default action (na.fail) causes
ACF.gls to print an error message and terminate if there are any
incomplete observations.lag and ACF representing,
respectively, the lag between residuals within a pair and the corresponding
empirical autocorrelation. The returned value inherits from class
ACF.ACF.gls, plot.ACFfm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary)
ACF(fm1, form = ~ 1 | Mare)Run the code above in your browser using DataLab