Displaying 1 result from an estimated 1 matches for "salichpred".
2010 May 26
1
validation logistic regression
...rder(random)
nrprofilesinsample<-sort(order(random)[1:100])
profilesample <- data[nrprofilesinsample,]
profilevalidation <- data[-nrprofilesinsample,]
salich<-profilesample$SALIC.H.1
salic.lr<-glm(salich~wetnessindex, profilesample, family=binomial('logit'))
summary(salic.lr)
salichpred<-predict(salic.lr, newdata=profilevalidation)
expsalichpred<-exp(salichpred)
salichprediction<-(expsalichpred/(1+expsalichpred))
So,
table(salichprediction, profilevalidation$SALIC.H.1)
in result:
salichprediction 0 1
0.0408806327422231 1 0
0.094509645033899 1 0
0.118...