[R-sig-Geo] To validate logistic regression

Komine momadou at yahoo.fr
Thu Apr 21 13:50:04 CEST 2011


Hi, 
I would like your help to validate my logistic regression. I know how to do
logistic regression. 

rlog<-glm(Y~X,family=binomial,data=tab)
summary(rlog)
HLgof.test(fit = fitted(rlog), obs=Y)

However, I would like to validate my model. For example to divise my data in
a sample for training (66%) and a sample for validation (34%).
e.g for ma table 
Area   Y     X 
1       1     135
1       0     200
1       1      97
1       1     160
1       0     201
1       1     144
1       0     100

But I don't know how to validate it. 
1- My first problem: How to create my 2 samples from my variables Y and X
using pourcentage 66 ang 34 %?

- How to have the pourcentage of good prediction and bad prediction?

Thanks for your Help 
Komine 


--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/To-validate-logistic-regression-tp6293834p6293834.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list