In one case they are exactly 0 and in the other they are almost zero. This
is the reason for different results.
Of course, they should be exactly the same, but this is due to some integer
values not being exactly represented as real values on binary computers.
Best,
Aleš Žiberna
On Fri, Sep 27,
Hi Berwin: Yes, that's it. Donsker is famous for a functional CLT so I was
mixing up statistics
and stochastic processes I better stick to statistics. It's safer. !
Thanks for correction.
I'm ccing R-help since it may be useful to someone there. See below for
Berwin's
comment.
Mark
On Sat,
Hello,
Maybe FAQ 7.31?
Check the residuals, they are all "zero" in both cases:
fit0 <- lm(y~x)
fit1 <- lm(1+y~x)
# residuals
table(resid(fit0))
#
# 0
#30
table(resid(fit1))
#
#-5.21223595241838e-16 -4.93038065763132e-31 3.12734157145103e-15
#623
correction to my previous answer. I looked around and I don't think it's
called the donsker effect. It seems to
jbe referred to as just a case of "perfect separability.". if you google
for" perfect separation in glms", you'll get a
lot of information.
On Fri, Sep 27, 2019 at 2:35 PM Mark Lee
Hi: In your example, you made the response zero in every case which
is going to cause problems. In glm's, I think they call it the donsker
effect. I'm not sure what it's called
in OLS. probably a lack of identifiability. Note that you probably
shouldn't be using zeros
and 1's as the response in a
Dear R community,
I just stumbled upon the following behavior in R version 3.6.0:
set.seed(42)
y <- rep(0, 30)
x <- rbinom(30, 1, prob = 0.91)
# The following will not show any t-statistic or p-value
summary(lm(y~x))
# The following will show t-statistic and p-value
summary(lm(1+y~x))
My expec
6 matches
Mail list logo