第七次作业-011

blanking 2017-09-19 07:19:14 阅读: 1002

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


 
邀请讨论

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
{{item.nick_name}} 受邀请回答 {{item.create_time}}
{{item.refer_comment.nick_name}} {{item.refer_comment.create_time}}

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
切换到完整回复 发送回复
赞({{item.count_zan}}) 踩({{item.count_cai}}) 删除 回复 关闭
科研狗©2015-2024 科研好助手,京ICP备20005780号-1 建议意见

服务热线

178 0020 3020

微信服务号