Skip to content

Standard errors from predict.gam versus predict.lm

2 messages · Dunbar, Michael J., Simon Wood

#
Mike,

Isn't this just an example of the wrong model giving a spurious
impression of precision? or more accurately, precision at the expense of
accuracy?

Here's a linear model example of the same thing...

set.seed(1)
n <- 400
x <- runif(n)-.5
y <- 2+ x*.2+ x^2 + rnorm(n)*.5
m1 <- lm(y~1)
m2 <- lm(y~x+I(x^2))
mean(predict(m1,se=TRUE)$se.fit)
#[1] 0.02641367
mean(predict(m2,se=TRUE)$se.fit)
#[1] 0.04363921

... so the wrong model (m1, a constant) gives much lower se than the
correct model (m2, a quadratic).

best,
Simon
On 17/02/12 14:57, Dunbar, Michael J. wrote: