R

时间:2017-05-29 12:21:04

标签: r glm

我有一组数据点可以适合以下模型:

temp <- structure(list(x = 1:119, y = c(50, 50, 43.1, 39.2, 34.3, 34.9, 
34.3, 32.5, 31.8, 30.1, 30.5, 29.7, 28.6, 28.5, 28.5, 28.6, 27.8, 
27.7, 26, 27, 26.9, 25.6, 25.8, 25.5, 25.1, 24.3, 24.1, 24.3, 
24.1, 24.8, 24.7, 24.5, 23.9, 23.8, 23.7, 23.7, 23, 23.3, 23.7, 
23.2, 22.8, 23.5, 22.7, 22.3, 22.7, 22.1, 22.1, 22.4, 22.5, 22.3, 
22, 22.2, 22.1, 22.3, 21.9, 23.5, 21.5, 21.4, 22.3, 21.9, 21.7, 
21.2, 21.6, 21.5, 21.5, 21.5, 21.7, 21.3, 20.9, 20.9, 21.2, 20.9, 
20.8, 21, 21.3, 21.3, 20.7, 21, 20.8, 20.8, 20.8, 20.9, 20.7, 
20.7, 20.1, 20.8, 20.8, 22.3, 20.8, 20.6, 20.4, 20.5, 20.2, 20.6, 
20.1, 20.5, 20.5, 22, 20.5, 20.3, 20.3, 20.3, 20.1, 20.1, 20.1, 
20.2, 20, 20.2, 20.2, 20.1, 20.1, 20, 20.1, 20.1, 20, 19.9, 20, 
19.8, 19.9)), .Names = c("x", "y"), row.names = c(NA, -119L), class = "data.frame")

mod <- glm(y ~ log(x)*atan(x), data=temp)
plot(temp)
lines(predict(mod), col="red")

enter image description here

问题是,模型公式的扩展是什么?

0 个答案:

没有答案