在R绘图函数中做什么是移位参数?

时间:2018-05-28 19:38:22

标签: r plot

在阅读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))的作用是什么?

0 个答案:

没有答案