有谁知道,如何获取您从此代码中获得的单个厨师距离图:
treatment <- factor(rep(c(1, 2), c(43, 41)), levels = c(1, 2), labels = c("placebo","treated"))
improved <- factor(rep(c(1, 2, 3, 1, 2, 3), c(29, 7, 7, 13, 7, 21)), levels = c(1, 2,3),labels = c("none", "some", "marked"))
numberofdrugs <- rpois(84, 5)+1
healthvalue <- rpois(84,5)
y <- data.frame(healthvalue, numberofdrugs, treatment, improved)
test <- glm(healthvalue~numberofdrugs+treatment+improved, y, family=poisson)
par(mfrow=c(2,2))
plot(test) # how to grab plot 2.1 ?
我不喜欢的是这个
par(mfrow=c(1, 1))
plot(test, which=c(4))
因为它在 y 轴上没有残差并且在 x 轴上没有杠杆作用!
多谢你们