【发布时间】:2011-09-03 14:00:12
【问题描述】:
有谁知道,如何获取从这段代码中得到的单个厨师距离图:
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 轴上没有杠杆!
谢谢大家
【问题讨论】:
-
你不能把你想要的诊断图向量传递给
which=吗?
标签: r statistics outliers