# solve the problem of 13 chapter rm(list = ls()) data <- read.csv("C:/users/mike1/desktop/data/RData/chapter13_oneExercise.csv", header = T, sep = ",") dim(data) names(data) # show the tabel data[1:10,]# show 10 lines result <- glm(y~目标速度, data = data, family = binomial(link = probit)) summary(result) result_fit <- result$fit result_fit result_prd <- result$linear.predictors result_prd result_res <- residuals(result, c = "deviance") result_res qqnorm(result_res) qqline(result_res) plot(result_prd, result_res) plot(result_fit, result_res)
预测值与残差图: