Displaying 1 result from an estimated 1 matches for "main_samp".
Did you mean:
main_map
2011 Mar 16
2
calculating AUCs for each of the 1000 boot strap samples
...list to achieve two objectives:
create 1000 samples from a list of 207 samples with each of the samples cointaining 20 good and 20 bad. THis i have achievedcalcuate AUC each of the 1000 samples, this i get an error.
Please see the code below and assist me.
> data<-data.frame(id=1:(165+42),main_samp$SCORE, x=rep(c("BAD","GOOD"),c(42,165)))
> f<-function(x) {
+ str.sample<-list()
+ for (i in 1:length(levels(x$x)))
+ {
+ str.sample[[i]]<-x[x$x==levels(x$x)[i] ,][sample(tapply(x$x,x$x,length)[i],20,rep=T),]
+ }
+ strat.sample<-do.call("rbind",str.sampl...