search for: pr4d

Displaying 1 result from an estimated 1 matches for "pr4d".

Did you mean: p4d
2002 Jul 26
0
predict() still not yet "safe".. (PR#1840)
...speed, data = cars)# the `same' all.equal(predict(cars.1), predict(cars1))# the fitted values are ok cars.4 <- lm(dist ~ poly(speed, degree = 4), data = cars) newd <- data.frame(speed = d <- seq(0, 25, length = 51)) # shorter than in ?cars pr1d <- predict(cars.1, newd) pr4d <- predict(cars.4, newd) plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)", las = 1, xlim = c(0, 25)) abline(cars1, col = "blue")# the correct one ## in R 1.5.0 and 1.5.1, these look wrong (particularly to the left!): lines(d, pr1d) lines(d, pr4...