Skip to content

Different sings for correlations in OLS and TSA

1 message · Spencer Graves

#
I haven't seen a reply to this, so I will offer a comment:

	  It looks to me like the correlation you question is the correlation 
between the estimated intercept and slope of the gls regression line. 
This is different from the correlation between ts.mar and ts.anr.  To 
understand this, consider the following addition to your script:

plot(ts.mar, ts.anr)
# The intercept and slope are negative
# because the mean of ts.mar is positive.

fit3a <- gls(ts.anr ~ I(ts.mar-1000),correlation = 
corARMA(value=c(mod3$coef[1],mod3$coef[2]),p=2))
summary(fit3a)

<snip>
  Correlation:
                  (Intr)
I(ts.mar - 1000) 0.988

# The estimated slope is the same
# in fit3 and fit3a
# but the sign of the correlation between
# intercept and slope has changed.

	  I hope this response still interests you, even though it comes well 
over a month after your post.  You are to commended for providing a 
good, reasonably complete example.  If it had been shorter, it might 
have received more comments sooner.

	  If this does not answer your question or you have another, please let 
us know.

	  spencer graves
Michael Tiemann wrote: