Could someone help me on this please?
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Dwaipayan Dasgupta
Sent: Thursday, May 03, 2012 1:43 PM
To: r-help at r-project.org
Subject: [R] Validation of logistic models in R 2.12
Hi everyone,
I am trying to validate a logistic model built in R. Not my version of R is 2.12
and I cannot install ROCR.
I have gone to a point where I have the predicted values using the code:
pred1 = predict(trainlogit1,testdata_1, type = "response")
How do I proceed from here? Is there another way in which I can plot lift
charts?
My model output is:
Call:
glm(formula = Attrition_ind ~ Time.in.com + UV_LTIA_Base +
as.factor(new_hire_ind) +
as.factor(promotion_ind) + as.factor(Time.in.comp...5.years) +
as.factor(Change.in.Job.Code) + Positioning_num + as.factor(Below.Guideline)
+
as.factor(Above.Guideline) + as.factor(Drop.in.Rating.in.2010) +
as.factor(Increase.in.Rating.in.2010) + as.factor(job_band),
family = binomial(link = "logit"), data = traindata_1)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.9604 -0.4888 -0.4221 -0.3514 2.9813
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.425494 0.115476 -12.345 < 2e-16
Time.in.comp -0.022690 0.007753 -2.927 0.003425
UV_LTIA_Base -0.960578 0.210247 -4.569 4.91e-06
as.factor(new_hire_ind)Y -0.446913 0.145942 -3.062 0.002197
as.factor(promotion_ind)Y -0.739080 0.195584 -3.779 0.000158
as.factor(Time.in.comp...5.years)Y -0.248776 0.118014 -2.108 0.035029
as.factor(Change.in.Job.Code)Y -0.244962 0.118475 -2.068 0.038675
Positioning_num -1.987576 0.529700 -3.752 0.000175
as.factor(Below.Guideline)Y -0.622856 0.171635 -3.629 0.000285
as.factor(Above.Guideline)Y -0.446067 0.252602 -1.766 0.077414
as.factor(Drop.in.Rating.in.2010)Y 0.292605 0.174543 1.676 0.093659
as.factor(Increase.in.Rating.in.2010)Y -0.315004 0.101213 -3.112 0.001856
as.factor(job_band)40 0.391219 0.108038 3.621 0.000293
as.factor(job_band)45 1.228778 0.213261 5.762 8.32e-09
as.factor(job_band)50 1.603452 0.434487 3.690 0.000224
as.factor(job_band)60 2.578905 0.559087 4.613 3.97e-06
(Intercept) ***
Time.in.comp **
UV_LTIA_Base ***
as.factor(new_hire_ind)Y **
as.factor(promotion_ind)Y ***
as.factor(Time.in.comp...5.years)Y *
as.factor(Change.in.Job.Code)Y *
Positioning_num ***
as.factor(Below.Guideline)Y ***
as.factor(Above.Guideline)Y .
as.factor(Drop.in.Rating.in.2010)Y .
as.factor(Increase.in.Rating.in.2010)Y **
as.factor(job_band)40 ***
as.factor(job_band)45 ***
as.factor(job_band)50 ***
as.factor(job_band)60 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05
'.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 4737.8 on 7473 degrees of freedom Residual deviance: 4607.0
on 7458 degrees of freedom
(250 observations deleted due to missingness)
AIC: 4639
Number of Fisher Scoring iterations: 5
Could you please help? How can I understand if my model is a good fit or not?
Regards,
Doy
American Express made the following annotations on Fri May 04 2012 01:37:47
******************************************************************************
"This message and any attachments are solely for the intended recipient and
may contain confidential or privileged information. If you are not the intended
recipient, any disclosure, copying, use, or distribution of the information
included in this message and any attachments is prohibited. If you have received
this communication in error, please notify us by reply e-mail and immediately
and permanently delete this message and any attachments. Thank you."
American Express a ajout? le commentaire suivant le Fri May 04 2012 01:37:47
Ce courrier et toute pi?ce jointe qu'il contient sont r?serv?s au seul
destinataire indiqu? et peuvent renfermer des renseignements confidentiels et
privil?gi?s. Si vous n'?tes pas le destinataire pr?vu, toute divulgation,
duplication, utilisation ou distribution du courrier ou de toute pi?ce jointe
est interdite. Si vous avez re?u cette communication par erreur, veuillez nous
en aviser par courrier et d?truire imm?diatement le courrier et les pi?ces
jointes. Merci.
******************************************************************************
-------------------------------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20120504/3f52b245/attachment.txt>