I have two models:
mod1 <- glm(y ~ A + CONTROL1 + CONTROL2, data = dat,family=binomial(link="logit"))
mod2 <- glm(y ~ B + CONTROL1 + CONTROL2, data = dat,family=binomial(link="logit"))
I'm trying to determine if slope A in mod1 is significantly different from slope B in mod2.
I'll give a reproducible example here:
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
mydata$sat<-rnorm(400, mean=1350, sd=100) # randomly generate SAT scores
m1 <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
m2 <- glm(admit ~ sat + gpa + rank, data = mydata, family = "binomial")
I am interested in finding out if the slope associated with
gre in m1 is significantly different from the slope associated with
sat in m2.
What are some tests in R that can help me get there?
Thanks in advance!