[R] Plotting 2D Logistic regression

(Ted Harding) Ted.Harding at manchester.ac.uk
Fri Oct 17 23:20:33 CEST 2008


On 17-Oct-08 17:59:55, Feldman, Ruben wrote:
> Hi,
> My data has time series for different variables and I want to predict
> "ctw" with the value of each other variable at that point in the
> series.
> I have run a logistic regression: 
> logreg <- glm(ctw ~ age + OFICO + ... + CCombLTV, data=mydata,
> family=binomial("logit"))
> And I am trying to get a plot of the logistic regression I have just
> performed, on the same plot as the actual time series. Apparently
> lin.reg can only deal with linear regressions, from the error I am
> getting.

Does

  plot(mydata$age, logreg$fit)

do something like what you are looking for?
Ted.

> Do you know what function I should be using and where I can get it?
> 
> Thanks so much!
> RF

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 17-Oct-08                                       Time: 22:20:31
------------------------------ XFMail ------------------------------



More information about the R-help mailing list