在阅读this page时,我看到了这段代码(我生成了假数据):
y = rbinom(n = 1000,size = 1,prob = .5)
x = abs(rnorm(1000))
mydata = data.frame(x,y)
z <- gam(y ~ s(x), data = mydata, family = binomial(link = "logit"),
method = "GCV.Cp")
plot(z, se = 1, seWithMean = TRUE, rug = FALSE, shift = mean(predict(z)),
trans = function(x){exp(x)/(1+exp(x))}) # binomial data
shift = mean(predict(z))
的作用是什么?