[Biomod-commits] Projection.raster question

Martin Videla videla.martin at gmail.com
Tue Feb 28 13:06:53 CET 2012


Dear BIOMOD group

I’m a new BIOMOD user having problems to project the models to the entire
study area using the Projection.raster function. Here is the error message



Error in model.frame.default(Terms, newdata, na.action = na.action, xlev =
object$xlevels) :

  invalid type (list) for variable 'DataF'

In addition: Warning message:

'newdata' had 230421 rows but variable(s) found have 132 rows



This is the script I used

Initial.State(Response  =  datasheet[9],  Explanatory  =
datasheet[,2:6],IndependentResponse  =  NULL, IndependentExplanatory  =
NULL)



Models(GLM  =  T,  TypeGLM  =  "simple",  Test  =  "AIC",  GBM  =  T,
No.trees  =  2000,  GAM  =  F,Spline  =  3,  CTA  =  T,  CV.tree  =  50,
ANN  =  T,  CV.ann  =  2,  SRE  =  T,  quant=0.025,  FDA  =  T,MARS  =  T,
RF  =  T,  NbRunEval  =  3,  DataSplit  =  70,  Yweights=Error,  Roc  =  T,
Optimized.Threshold.Roc  =  T,Kappa  =  T,  TSS=T,  KeepPredIndependent  =
F,  VarImport=5,  NbRepPA=0,  strategy="circles",coor=Coord,  distance=2,
nb.absences=0)



CurrentPred(BinRoc=T, BinKappa=T, BinTSS=T, FiltRoc=T, FiltKappa=T,
FiltTSS=T)



Var 1=raster("C:/…./Var 1.grd")

Var3=raster("C:/…./Var3.grd")

Var4=raster("C:/…./Var4.grd")

Var12=raster("C:/…./Var12.grd")

Var15=raster("C:/…./Var15.grd")

varclim=stack(Var1,Var3,Var4,Var12,Var15)



Projection.raster(RasterProj = varclim, Proj.name="Project",GLM=TRUE,
BinKappa=TRUE, FiltKappa=TRUE, repetition.models=TRUE, stack.out=TRUE,
compress="xz")



Any help will be very welcomed,

Thanks!


-- 
Martín
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20120228/d7e062b6/attachment-0001.html>


More information about the Biomod-commits mailing list