第七期作业-R007

Adobe Freeman 2017-09-12 22:51:54 阅读: 1112

A1

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)
fit <- lm(Y ~ X)
plot(x,y)
plot(X,Y, main = "Y = 29.029 +118.639X")
abline(fit)

A2

mytable <- read.csv(file.choose())
mytable
Y <-mytable$CON
X <-mytable$std_ave
pro_fit <- lm(Y ~ X)
plot(X,Y,main = "A7:linear regression",
     sub = "BCA method for Protein Concentration measurement",
     xlab = "OD 750",
     ylab = "concentraion(units:ug/ul)",
     bty = "l",
     cex = 1.5,
     lwd = 2
     )
abline(pro_fit,
       col = gray(0.6),
       lwd = 2,
       lty = 2)
sam <- data.frame( X = mytable$sam_ave)
sam_pred <- predict(pro_fit,sam,interval = "prediction",level = 0.95)
sam_pred
points(mytable$sam_ave,sam_pred[,1],
       col = "red", 
       pch = c("A","B","C","D"),
       cex = 2,
       font = 2)
par(mfrow=c(2,2));plot(pro_fit)

 
邀请讨论

附件

{{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

微信服务号