search for: cvfit

Displaying 3 results from an estimated 3 matches for "cvfit".

Did you mean: vfit
2018 Apr 13
0
cvTools for 2 models not working
...19,32,12,11,10,9,8,45,34,23,26,29,6,35,47,21,29,26,25) ? reg1 <- lm( Y ~ X+Z ) ? reg <- lmrob( Y ~ X + Z) ? Huber <- rlm( Y ~ X +Z) ? Tukey <- rlm( Y ~ X+Z, psi = psi.bisquare ) ? L1 <- rq( Y ~ X + Z, tau = 0.5 ) ? fast <- FastTau(model.matrix(~X+Z),Y) HBR<-hbrfit(Y ~ X +Z)? cvFit(lmrob,formula=Y ~ X + Z, cost=rtmspe, K=5, R=100) ? cvFit(lm,formula=Y ~ X + Z, cost=rtmspe, K=5, R=100) cvFit(rlm,formula=Y ~ X + Z, cost=rtmspe, K=5, R=100) cvFit(rlm,formula=Y ~ X + Z, psi = psi.bisquare, cost=rtmspe, K=5, R=100) cvFit(rq,formula=Y ~ X + Z, tau=0.5, cost=rtmspe, K=5, R=100)...
2011 Jun 20
2
Error of Cross Validation
Dear R users: Recently, I tried to write a program to calculate cross-validated predicted value. My sources are as follows. However, the R reported an error. Could you please check the sources? Thanks. set.seed(100) x<-rnorm(100) y<-sample(rep(0:1,50),replace=T) dat<-data.frame(x,y) library(rms) fito<-lrm(y~x) preo<-predict(fito) pre<-matrix(NA,nrow=100,ncol=200) for (i in
2010 Jan 21
3
cross validation function translated from stata
...aset. 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<-dca(cvMain$Y,cvMain$cvpre,prob=("Y")) cvnb<-100*(cvdcaop[,1]-cvdcaop[,2]) cvtpthres<-cvdcaop[,4]/(100-cvdcaop[,...