(v2) [R] quadratic trends and changes in slopes (R-help digest, Vol 1 #52 - 16 msgs)
kjetil brinchmann halvorsen
kjetil at entelnet.bo
Tue Jan 21 23:11:45 CET 2003
On 20 Jan 2003 at 21:49, Chuck White wrote:
>
> I'd like to use linear and quadratic trend analysis in order to find
> out a change in slope. Basically, I need to solve a similar problem as
> discussed in
> http://www.gseis.ucla.edu/courses/ed230bc1/cnotes4/trend1.html
>
This response show how to do the test of non-linearity in a
complicated way, all can be done much easier in R, start to
look at poly() and contr.poly() (and summary.aov with the argument
split=). But that is not the point. The original poster did'nt want
to test for nonlinearity, he assumed there is nonlinearity and wanted
to estimate the change point. He also said that the usual procedure
to do that in his field is to estimate cuadratic models for data
1, 1:2, 1:3, ..., 1:9 (or some similar number) and take the change-
point as the value of i above (in 1:i) where the quadratic term
first is significant. That cannot be sound, as you obviously must go
somewhat past the changepoint before the quadratic term can become
significant! So this method cannot possibly give an consistent
estimator of the change-point. He should use some other method, like
building a model with an explicit change-point and estimate that.
Kjetil Halvorsen
More information about the R-help
mailing list