The reason is that you asked for more terms than can exist.
You seem unaware that 2.6.2 is obsolete, and that there are changes
in R-patched, with the following NEWS item:
o poly() has additional checks against user error (as in PR#11243).
and that the help page now says
degree: the
I don't understand why this is a bug in usage. Is it because the 2nd
argument is not named? I get the same behavior if I do name it:
=
[R version 2.6.2 (2008-02-08), Windows XP Pro]
R> x = rep(1:4,3)
R> y = (1:12)^1.5
R> lm(y ~ poly(x, degree=10))
Call:
lm(formula = y ~ poly(x, degree = 1
Full_Name: Russell Lenth
Version: 2.6.2
OS: Windows XP Pro
Submission from: (NULL) (128.255.132.36)
The poly() function allows a higher-degree polynomial than it should, when
raw=FALSE.
For example, consider 5 distinct 'x' values, each repeated twice. we can fit a
polynomial of degree 8:
=