Re: [R] Finding predicted probabilities and their confidence intervals for a logit model

2013-02-04 Thread Ista Zahn
Hi,

I think you are looking for

as.data.frame(effect(value, mod))

Best,
Ista

On Tue, Jan 29, 2013 at 6:08 PM, Abraham Mathew abmathe...@gmail.com wrote:
 I want to construct a logit model, plot the probability curve with the
 confidence intervals, and then I want to
 print out a data frame with the predictor, response value, predicted value,
 the low ci predicted value, and the
 high ci predicted value. So it should look something like:

 value  low_ci   prob   hi_ci
 50.10  0.12   0.13
 60.11  0.130.16
 70.13  0.150.17
 

 Here's some sample data, the glm model, and a plot using the effects. I
 have the plot, I
 just need the presided data.

 dt - data.frame(won=c(rep(1,50),rep(0,50)), value=c(rnorm(100)))

 mod - glm(won ~ value, data=dt, family=binomial)
 mod

 library(effects)
 plot(effect(value, mod), rescale.axis=FALSE, multiline=TRUE)


 Help!

 Thank You!

 [[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.

__
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.


[R] Finding predicted probabilities and their confidence intervals for a logit model

2013-01-29 Thread Abraham Mathew
I want to construct a logit model, plot the probability curve with the
confidence intervals, and then I want to
print out a data frame with the predictor, response value, predicted value,
the low ci predicted value, and the
high ci predicted value. So it should look something like:

value  low_ci   prob   hi_ci
50.10  0.12   0.13
60.11  0.130.16
70.13  0.150.17


Here's some sample data, the glm model, and a plot using the effects. I
have the plot, I
just need the presided data.

dt - data.frame(won=c(rep(1,50),rep(0,50)), value=c(rnorm(100)))

mod - glm(won ~ value, data=dt, family=binomial)
mod

library(effects)
plot(effect(value, mod), rescale.axis=FALSE, multiline=TRUE)


Help!

Thank You!

[[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.