Skip to content
Prev 12098 / 20628 Next

gls function - goodness of fit

Hebert, Issac (MNR <Issac.Hebert at ...> writes:
I don't know the answer (sorry), but I will suggest that this might be
a non-trivial statistical question; in general, 'simple' goodness-of-fit
questions become more difficult as soon as you encounter anything
more complicated than simple least-squares problem.  You can compare
your model to a null model and see if it is significantly better,
but I don't know whether any of the standard strategies (e.g. comparing
proportion of sum of squared residuals to those of a null model)
make sense in this case.               

library(nlme)
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
            correlation = corAR1(form = ~ 1 | Mare), method="ML")
fm0 <- update(fm1,.~1)
anova(fm0,fm1)
## ???

A Google Scholar search finds Buse (1973)
"Goodness of Fit in Generalized Least Squares Estimation"
DOI: 10.1080/00031305.1973.10479003

  Buse gives an expression for R^2 (eq. 15), although (1) this isn't
completely trivial (you have to set up an estimated
variance-covariance matrix for the residuals) and (2) Buse warns that
it shouldn't be taken too seriously (e.g. shouldn't be used for
statistical tests).
fo