[Biomod-commits] Error with Ensemble.Forecasting

Visser, V, Dr <vernonvisser@sun.ac.za> vernonvisser at sun.ac.za
Wed May 30 16:34:25 CEST 2012


I am getting an error while trying to run Ensemble.Forecasting:

Error in array(STATS, dims[perm]) : attempt to set an attribute on NULL
In addition: Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In max(cumDim[cumDim <= lstats]) :
  no non-missing arguments to max; returning -Inf

I have used both my own data and the example data that comes with BIOMOD and still get this error. My code is as follows using the BIOMOD data:

data(Sp.Env)
data(CoorXY)
Initial.State(Response = Sp.Env[,13], Explanatory = Sp.Env[,4:10], sp.name="sp1")

Models(GAM = T,Spline = 4,
       NbRunEval = 2,
       DataSplit = 70,
       NbRepPA=1,
       strategy="random",
       coor=alldata2[,12:13],
       nb.absences=5000,
       Roc = T,
       VarImport=T
       )

data(Future1)
Projection(Proj=Future1[,4:10], Proj.name="sp1", ANN=F,CTA=F,GAM=T,GBM=F,GLM=F,MARS=F,
           FDA=F,RF=F,SRE=F,repetition.models=T, compress="xz",FiltRoc=T)
Ensemble.Forecasting(Proj.name="sp1",ANN=F,CTA=F,GAM=T,GBM=F,GLM=F,MARS=F,
                     FDA=F,RF=F,SRE=F, weight.method='Roc',decay=1.6,binary=T,bin.method="Roc",Test=T,repetition.models=T)


traceback() gives the following information:

7: array(STATS, dims[perm])

6: aperm(array(STATS, dims[perm]), order(perm))

5: apply((x > y), 2, as.integer)

4: FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...)

3: sweep(data.matrix(ProbData), 2, CutOffdata, FUN2)

2: BinaryTransformation(ARRAY.tot[, i, "median"], median(ths[[3]][TotalModels]))

1: Ensemble.Forecasting(Proj.name = paste("clunum", c(x * 10 + y +

       1), sep = ""), ANN = F, CTA = F, GAM = T, GBM = F, GLM = F,

       MARS = F, FDA = F, RF = F, SRE = F, weight.method = "Roc",

       decay = 1.6, binary = T, bin.method = "Roc", Test = T, repetition.models = T)



Vernon Visser
Post-doctoral Research Associate
Centre of Excellence for Invasion Biology
Department of Botany and Zoology
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland
7602
South Africa
https://sites.google.com/site/vernonvisserpostdoc/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20120530/1319b15f/attachment.html>


More information about the Biomod-commits mailing list