I've been looking into the effects package and it seems to be a great tool
for plotting the probabilities of the
response variable by the predictors. However, I'm wonder if I can use the
effects package to plot the probabilities
on the y axis and one predictor on the x axis, with the curve having the
info for another predictor.

So let's say our response variable is win, a binary variable. There are two
predictors, home (categorical) and
bid (continuous). For both home and bid, I want to generate plots showing
the predicted probabilities for all
the "levels" of that variable.

For bid, that means the probability for winning at all bid levels. For
home, the curve for the probability for winning
at each level.

df <- data.frame(won=c(1,0,1,0,1,0,0,0,0,1),
                 bid=c(150,200,135,140,130,150,200,135,140,130),
                 home=c(1,0,0,0,1,1,0,0,0,1))
df

m1 = glm(won ~ bid + home, data=df, family=binomial(link="logit"))
summary(m1)
eff <- effect("bid", m1, xlevels=list(bid=df$bid), typical="median")
print(plot(eff, rescale.axis=F))

The thing I'm concerned about is the curve for home. For any logit
equation, say with a coefficient of 2.5, that is the
log odds change in Y regardless of the values of the other predictors. So
I'm not sure I'm doing the write thing in that
context.

Can anyone help.

Thanks
*
*

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to