2
$\begingroup$

Does anyone know how to determine the significance of the slope from linear model fitted using generalised least squares (GLS)? I am fitting a linear model to temperature time series with the aim of assessing for trends using gls function in nlme package, but I could not figure out the p-value (s) for the slope in model outputs. I chose GLS because of serial correlation.

$\endgroup$

1 Answer 1

2
$\begingroup$

Corrected !

GLS does remedy the serial correlation problem thus dealing with both non-constant variance (diagonal) and off cross-correlative structure ( off diagonal). An alternative and in my opinion a more cohesive and data-based approach is to incorporate ARIMA structure along with any necessary dummy indicators and Weighted Least Squares to homogenize the diagonal. In this way a model can be constructed via diagnostic checking to render the final set of errors Gaussian. Your assumption about "one trend" might need to be tested along with potential transience of coefficients over time. You also have to be very concerned with distinguishing trends from level shifts. Pulses and Seasonal Pulses also have to be considered. All in all I suggest that you might pursue an ARIMA approach and also include Intervention Detection empirically detecting the need for Pulses/Level Shifts/Seasonal Pulses/Local Time Trends . Then test for non-constant error variance suggesting weights that need to be used in your comprehensive weighted least squares model. The ARIMA structure renders the off-diagonal structure to be null while the Outlier/Intervention Detection reduces the diagonal elements and the weights render the diagonal elements to be invariant/constant.

$\endgroup$
1
  • 3
    $\begingroup$ gls() in nlme does allow you to alter the off-diagonal elements of the variance covariance matrix and Fox's (2008) Applied Regression Analysis & GLMs has GLS very much at the centre of a chapter on time series regression. The details are in Pinhiero & Bates on mixed models in S $\endgroup$ Commented Apr 2, 2012 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.