服务热线
178 0020 3020
第一期第7次作业
7.1
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,main="Y=29.029+118.639")
A <- lm(Y~X)
abline(A)
7.2
setwd("D:/R语言学习资料/R group task 7")
getwd()
a <- read.csv("BCA.csv",header = T)
A <- a$CON
B <- a$std_ave
C <- lm(A ~ B)
plot(B,A,main = "A7:linear regression",
sub = "BCA method for Protein Concentration measurement",
xlab = "OD 750",
ylab = "Concentraion(units:ug/ul)",
bty = "l")
abline(C)
legend("bottomright",legend = "R^2=0.994")
sam <- data.frame(B=a$sam_ave)
sam_pred <- predict(C,sam,interval="prediction",level = 0.95)
points(a$sam_ave,sam_pred[,1],col="green",pch=c("A","B","C","D"),cex=3)
par(mfrow=c(2,2));plot(C)
附件