Why this interaction is happening in multiple regression?

24 Views Asked by At

I attach R code.


b<-rnorm(9999,0,999)
s<-rnorm(9999,0,1)

This has nearly 0 correlation.

and I can make a y with this b, and s.

y <- s + b


(I omit error variance so that I Can see what's going on clearly.)


summary(lm(y~s+b+s:b))

the interaction should not be sig, but it is significant. why it happened?

1

There are 1 best solutions below

0
On

Maybe it is Monte Carlo error. I reran the data generation and line-fitting 10 times and the smallest p-value I got was .11 for the interaction, so not significant. Both s and b are significant in the model with s and b alone as well as s, b, and interaction. The intercept is not significant.