Displaying 1 result from an estimated 1 matches for "cvdcaop".
2010 Jan 21
3
cross validation function translated from stata
...)
cvMain<-cbind(cMain,cvgroup,cvpre)
for (j in 1:10) {
cvdev<-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 ar...