[R] Bug in termplot?
Simon Wotherspoon
Simon.Wotherspoon at utas.edu.au
Thu Jan 22 07:06:27 CET 2004
Hi,
Is this a bug in termplot, or (once again) do I just not understand what R
is really doing?
I am using termplot to contruct partial residual plots,
1. For all terms at once
2. One term at a time
but I get different results from these two methods. To give a concrete
example, I would have thought the top and bottom rows of the plot
constructed with the following code would be identical.
Grateful for any clues
Simon.
## Term plot example
n <- 50
x1 <- 2*runif(n)
x2 <- 2*runif(n)
y <- x1+sin(x2)+0.1*rnorm(n)
fit <- lm(y ~ x1 +x2)
par(mfrow=c(2,2))
termplot(fit,partial=T)
termplot(fit,terms="x1",partial=T)
termplot(fit,terms="x2",partial=T)
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 1
minor = 8.1
year = 2003
month = 11
day = 21
language = R
Windows ME 4.90 (build 3000)
Search Path:
.GlobalEnv, package:methods, package:ctest, package:mva, package:modreg,
package:nls, package:ts, Autoloads, package:base
---
More information about the R-help
mailing list