服务热线
178 0020 3020
X <- c(0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.20,0.23)
Y <- c(42.0,43.5,45.0,45.5,45.0,47.5,49.0,53.0,50.0,55.0,55.0)
plot(X,Y)
linear <- lm(Y~X)
abline(linear)
BCA <- read.csv("/Users/taowang/documents/R/A7/BCA.csv",header = T)
head(BCA)
x <- BCA$std_ave
y <- BCA$CON
plot(x,y)
linear <- lm(y~x)
abline(linear)
sam <- data.frame(x = BCA$sam_ave)
predict(linear, data.frame(x = BCA$sam_ave),interval = "prediction")
========================================================
预测结果:
fit lwr upr
1 0.7279902 0.6971976 0.7587828
2 0.8292168 0.7970183 0.8614153
3 0.5746469 0.5454663 0.6038275
4 0.2208548 0.1925586 0.2491511
附件