Re: [Rd] lm combined with splines

2010-02-09 Thread Prof Brian Ripley
This is really a question for R-help: it is not about R development nor software development in R. The answer to the only question I see is simple: your model depends on 'fb3' and you supplied 'height'. On Tue, 9 Feb 2010, Randriamiharisoa Alex wrote: Hello, In the following I tried 3 ver

[Rd] lm combined with splines

2010-02-09 Thread Randriamiharisoa Alex
Hello, In the following I tried 3 versions of an example in R help. Only the two first predict command work. After : library(splines) require(stats) 1) fm1 <- lm(weight ~ bs(height, df = 5), data = women) ht1 <- seq(57, 73, len = 200) ph1 <- predict(fm1, data.frame(height=ht1)) # OK plot(wom