Thanks to Berwin and Peter for their replies. The following code clarifies what's going on in Peter's example. I shall upodate my intuition!
x1 <- runif(100,8,10) x2 <- x1^2 y <- (x1-9)^2+rnorm(100,sd=.1) opar <- par(mfrow=c(2,2), las=1) plot(x1, y, main="x1 Only") plot(residuals(lm(x1~x2)), residuals(lm(y~x2)), main="Added-Variable Plot for x1") plot(x2, y, main="x2 Only") plot(residuals(lm(x2~x1)), residuals(lm(y~x1)), main="Added-Variable Plot for x2") par(opar) ## Using Lattice graphics require(lattice) cloud(y ~ x1 * x2) ## Using RGL graphics (with brute force scaling) require(rgl) rgl.clear("all") rgl.bg(sphere = TRUE, color = c("black", "green"), lit = FALSE, size=2, alpha=0.2, back = "lines") rgl.light() rgl.bbox() x1 <- runif(100,8,10) * 10 x2 <- (x1/10)^2 esty <- ((x1/10-9)^2 + rnorm(100,sd=.1)) * 20 rgl.spheres(x1, esty, x2, color="gray", radius=0.5, specular="green", texture=system.file("textures/bump_dust.png",package="rgl"), texmipmap=T, texminfilter="linear.mipmap.linear") Cheers Andrew On Fri, Mar 31, 2006 at 12:09:14PM +0200, Peter Dalgaard wrote: > Berwin A Turlach <[EMAIL PROTECTED]> writes: > > > Don't know if the following example, which shows the same behaviour, > > leads to any insight. > > > > > n <- 100 > > > x1 <- runif(n, -1,1) > > > x2 <- runif(n, -1,1) > > > y <- x1*x1*x2 + rnorm(n, sd=0.05) > > > y <- y - mean(y) > > > anova(lm(y~x1+x2)) > > Here's another (paraphrased from the Pixel data in nlme, which have > similar behaviour) > > x1 <- runif(100,8,10) > x2 <- x1^2 > y <- (x1 - 9)^2 + rnorm(100, sd=.1) > plot(x1, y) > anova(lm(y ~ x1 + x2)) > anova(lm(y ~ x2 + x1)) > summary(lm(y ~ x1)) > summary(lm(y ~ x2)) > summary(lm(y ~ x1 + x2)) > > > -- > O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B > c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K > (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 > ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 -- Andrew Robinson Department of Mathematics and Statistics Tel: +61-3-8344-9763 University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599 Email: [EMAIL PROTECTED] http://www.ms.unimelb.edu.au ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html