我对泊松回归中标准差的估计量感兴趣。所以方差是
其中和。所以方差应该是。(我只是对方差应该如何感兴趣,所以如果发生过度分散(),我不在乎)。因此,方差的估计量应该是
并且标准差的估计量应该是
这个对吗?我还没有在泊松回归的背景下找到关于标准偏差的讨论,这就是我问的原因。
例子:
因此,这是我正在谈论的一个简单示例(顺便说一句,这毫无意义)。
data1 <- function(x) {x^(2)}
numberofdrugs <- data1(1:84)
data2 <- function(x) {x}
healthvalue <- data2(1:84)
plot(healthvalue, numberofdrugs)
test <- glm(numberofdrugs ~ healthvalue, family=poisson)
summary(test) #beta0=5.5 beta1=0.042
mu <- function(x) {exp(5.5+0.042*x)}
plot(healthvalue, numberofdrugs)
curve(mu, add=TRUE, col="purple", lwd=2)
# the purple curve is the estimator for mu and it's also
# the estimator of the variance,but if I'd like to plot
# the (not constant) standard deviation I just take the
# square root of the variance. So it is var(y)=mu=exp(Xb)
# and thus the standard deviation is sqrt(exp(Xb))
sd <- function(x) {sqrt(exp(5.5+0.042*x))}
curve(sd, col="green", lwd=2)
绿色曲线是泊松回归中标准差的正确估计量吗?应该是吧?