You have an about 11-D response surface, not a curve!

-- Bert

On Thu, Jul 5, 2012 at 2:39 PM, Abraham Mathew <abmathewks@gmail.com> wrote:

> I have a logit model with about 10 predictors and I am trying to plot the
> probability curve for the model.
>
> Y=1 = 1 / 1+e^-z  where  z=B0 + B1X1 + ... + BnXi
>
> If the model had only one predictor, I know to do something like below.
>
> 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")
>
>
> I'm not sure how to proceed when I have 10 or so predictors in the logit
> model. Do I simply expand the
> expand.grid() function to include all the variables?
>
> So my question is how do I form a plot of a logit probability curve when I
> have 10 predictors?
>
> would be nice to do this in ggplot2.
>
> Thanks!
>
>
> --
> *Abraham Mathew
> Statistical Analyst
> www.amathew.com
> 720-648-0108
> @abmathewks*
>
>         [[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.
>



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

	[[alternative HTML version deleted]]

