Related my earlier question here. Having "mastered" linear regression, I'm trying to learn everything I can about logistic regression and am having issues turning largely "useless" coefficients into meaningful information.
I asked in my previous question about graphing the probability curve for every permutation of a logit model. However, I was working on just plotting the main curve and was having some issues.
If I was running a logit with just one predictor, I'd run the following:
mod1 = glm(factor(won) ~ as.numeric(bid), data=mydat, family=binomial(link="logit")) all.x <- expand.grid(won=unique(won), bid=unique(bid)) y.hat.new <- predict(mod1, newdata=all.x, type="response") plot(bid<-000:250,predict(mod1,newdata=data.frame(bid<-c(000:250)),type="response"), lwd=5, col="blue", type="l")
However, what about with multiple predictors? I tried to use the mtcars data set to mess around and couldn't get it.
Any suggestion on how to plot the main probability curve for the logit model.
head(mtcars) m1 = glm(vs ~ disp + wt, data=mtcars, family=binomial(link="logit")) summary(m1) all.x <- expand.grid(vs=unique(mtcars$vs), disp=unique(mtcars$disp), wt=unique(mtcars$wt)) y.hat.new <- predict(m1, newdata=all.x, type="response") plot(disp<-000:250,predict(m1,newdata=data.frame(disp<-c(000:250), wt<-c(0,250)),type="response"), lwd=5, col="blue", type="l")
EDIT = OR is my previous question what I need to do. Since Y = B0 + B1X1 + B2X2, a one unit change in X1 is associated with a exp(B1) change in Y, regardless of the value of B2. Then would it be possible that my original question is really all that should be done.
My appologies on my stupidity if that is indeed the case.