search for: cvmain

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

Did you mean: vmain
2010 Jan 21
3
cross validation function translated from stata
...elp2 threshold, sort) ================================================================= Here is my draft of R code. cMain is my dataset. predca<-rep(0,40000) dim(predca)<-c(200,200) for (i in 1:200) { cvgroup<-rep(1:10,length=110) cvgroup<-sample(cvgroup) cvpre<-rep(0,length=110) 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&...