search for: x2new

Displaying 2 results from an estimated 2 matches for "x2new".

Did you mean: d2new
2005 Oct 05
0
bug found in predict.locfit in locfit package ( PR#8057)
...riables 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 beta). I...
2005 Aug 08
1
bug found in predict.locfit in locfit package (PR#8057)
...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 # for example x1=x1new...