search for: x1new

Displaying 4 results from an estimated 4 matches for "x1new".

2005 Oct 05
0
bug found in predict.locfit in locfit package ( PR#8057)
...ning variables with the same names as those used in the fitting process. E.g., you fitted the model with objects named `y', `x1' and `x2'. predict() will try to look for objects by those names, first in newdata, then in the global environment. Since you supplied newdata as data.frame(x1new, x2new), predict() cannot find x1 and x2 there, so it ends up using the copy you have in the global environment. You need to use newdata=data.frame(x1=x1new, x2=x2new). FYI, thanks to help from Uwe and Brian, I now have Prof. Loader's new version of locfit passing R CMD check (using R-2.2.0 be...
2013 Jun 11
1
Help needed in feature extraction from two input files
...ACAAAAAAA >or4|793 ATCTCTCTCCTCTCTCTCTAAAAA >or7|123456789 ACGTGTGTACCCCC"))? lines2New<-unlist(lapply(split(lines2,(seq_along(lines2)-1)%/%2+1),function(x) paste(x,collapse="\n")),use.names=FALSE) res<-lapply(lines1,function(x) {x1<- strsplit(x," ")[[1]]; x1New<-x1[-1];x2<-? gsub(">(.*)\\n.*","\\1",lines2New);lines3<-lines2New[match(x1New,x2)];write.table(lines3,paste0(x1[1],".txt"),row.names=FALSE,quote=FALSE)}) Attached is one of the files generated by the code. A.K. Hi all, I have two input files. First f...
2005 Aug 08
1
bug found in predict.locfit in locfit package (PR#8057)
...on fityxv=locfit(~y+x1+x2,alpha=1,deg=1) fyxv=predict(fityxv,where="data") ######## Marginal distribution of gxv # fit marginal distribution of y fitxv=locfit(~x1+x2,alpha=0.5,deg=1) gxv=predict(fitxv,where="data") ######## Prediction of fyxv and gxv # new data vx1=0.2 vx2=0.7 x1new=rep(vx1,ndat) x2new=rep(vx2,ndat) ynew=y # marginal distribution of gxv for new data newdata=data.frame(x1new,x2new) gxvnew=predict(fitxv,newdata) #bug!!! gave the same values as gxv # This bug can be avoid by setting new values into old variables # then, we will get the new predicted values #...
2013 Apr 13
2
Comparison of Date format
Hi, ?In the example you provided, it looks like the dates in Date2 happens first.? So, I changed it a bit.? DataA<- read.table(text=" ID,Status,Date1,Date2 ??? ??? ?????? 1,A,3-Feb-01,15-May-01 ??? ??? 1,B,15-May-01,16-May-01 ??? ??? 1,A,16-May-01,3-Sep-01 ??? ??? ??? ??? ??? 1,B,3-Sep-01,13-Sep-01 ??? ??? ??? ??? ??? 1,C,13-Sep-01,26-Feb-04 ??? ??? ??? ??? ???