I am a bit puzzled about the behavior of uncorrelated predictors in logistic regression.

As in OLS, I thought that if two predictors (X1 and X2) are uncorrelated, then the regression weights of X1 will not change from a regression that only includes X1 to one that includes X1 and X2.

However, it seems to be the case that this is not true in logistic regression and coefficients change between the two regression models, even if the predictors are uncorrelated.

I have pasted some R syntax below that demonstrates this behavior.

Why is this the case and how do the regression weights from the two regressions (the one with only X1 and the other one with X1 and X2) relate to each other? Is there a way to know what the regression weight of X1 will be if one knows the regression weight of X1 in the regression that includes both predictors?

Thanks!

Code:

```
library(MASS)
#generate lots of data
n <- 500000
rdta <- as.data.frame(mvrnorm(n=n,c(0,0),matrix(c(1,0,0,1),2,2),empirical=TRUE))
names(rdta) <- c("rv1","rv2")
#confirm that preds are uncorrelated
cov(rdta$rv1,rdta$rv2)
rv1 <- rdta$rv1
rv2 <- rdta$rv2
rv1ry <- 1
rv2ry <- 1
#generate binary data from known regression coefficients
ylinp <- (1 / (1+exp(-(-1 + rv1*rv1ry + rv2*rv2ry))))
y <- rbinom(n,1,ylinp)
glm(y~rv1+rv2,family=binomial(link='logit'))
glm(y~rv1,family=binomial(link='logit'))
glm(y~rv2,family=binomial(link='logit'))
```