> wine.mod1 <- lm(wine ~ adultpop) > summary(wine.mod1) Call: lm(formula = wine ~ adultpop) Residuals: Min 1Q Median 3Q Max -84.362 -38.334 -2.864 19.558 124.785 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -347.9736 21.9895 -15.82 <2e-16 *** adultpop 4.3092 0.1417 30.40 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 48.64 on 67 degrees of freedom Multiple R-squared: 0.9324, Adjusted R-squared: 0.9314 F-statistic: 924.2 on 1 and 67 DF, p-value: < 2.2e-16 > > library(lmtest) > > dwtest(wine ~ adultpop) Durbin-Watson test data: wine ~ adultpop DW = 0.1199, p-value < 2.2e-16 alternative hypothesis: true autocorrelation is greater than 0 > > library(nlme) > > wine.mod2 <- gls(wine ~ adultpop, correlation=corAR1(form=~year), method='ML') > summary(wine.mod2) Generalized least squares fit by maximum likelihood Model: wine ~ adultpop Data: NULL AIC BIC logLik 591.7464 600.6828 -291.8732 Correlation Structure: AR(1) Formula: ~year Parameter estimate(s): Phi 0.9319506 Coefficients: Value Std.Error t-value p-value (Intercept) -346.7972 71.60350 -4.843299 0 adultpop 4.2528 0.44049 9.654536 0 Correlation: (Intr) adultpop -0.938 Standardized residuals: Min Q1 Med Q3 Max -1.63310579 -0.64323267 0.04944724 0.60053052 2.96796652 Residual standard error: 45.19112 Degrees of freedom: 69 total; 67 residual