temp')R2_adj <- c()p_value <- c()for (i in env) { fit_stat <- summary(lm(dat[['fish']]~dat[[i]])) #一元线性回归 R2_adj <- c(R2_adj, fit_stat$adj.r.squared) #提取校正后 R2 p_value <- c(p_value, fit_stat$coefficients[2,4]) #提取显著性 p 值}env...
resid(model) plot(model) predict(model,data.frame(x=50)) sx=sort(x) plot(x,y); abline(model) pred = predict(model,data.frame(x=sx),interval="confidence) conf = predict(model,data.frame(x=sx),interval="prediction") plot(x,y); abline(model) line...