search for: cvnb

Displaying 1 result from an estimated 1 matches for "cvnb".

Did you mean: canb
2010 Jan 21
3
cross validation function translated from stata
...vdev<-cvMain[cvMain$cvgroup!=j,] cvval<-cvMain[cvMain$cvgroup==j,] cvfit<-lrm(Y~X,data=cvdev,x=T,y=T) cvprej<-predict(cvfit,cvval,type="fitted") #put the fitted value in dataset cvMain[cvgroup==j,]$cvpre<-prej } cvdcaop<-dca(cvMain$Y,cvMain$cvpre,prob=("Y")) cvnb<-100*(cvdcaop[,1]-cvdcaop[,2]) cvtpthres<-cvdcaop[,4]/(100-cvdcaop[,4]) cvnr<-cvnb/cvtpthres predca[cvn,1:99]<-cvnb predca[cvn,101:199]<-cvnr } ================================================================= My questions are 1. How to ensure equal numbers of events in each set in...