[Biomod-commits] Using independent data to evaluate a model
Damien Georges
damien.georges2 at gmail.com
Fri Oct 26 15:08:05 CEST 2012
Dear Enelge,
First of all, you have to know that an updated version of BIOMOD package
called biomod2 is able on R-Forge since a while. I strongly encourage
you to switch to this package version if you just began your study.
That being said, all models developed in BIOMOD (the version you are
working with) are not spacial based models (they don't need points
coordinates to work) so you don't have to give such information for your
independent data. For "calibrating data", the coordinates are optional
and only used for results plotting.
Concerning the error you have.. could you check first that no NA's
occurs in your dataset.
## Check if some NA's occurs
summary(alldata5)
summary(alldataH)
## If some NA's.. do someting like
alldata5 <- na.omit(alldata5)
alldataH <- na.omit(alldataH)
## and run your script again..
Does it helps?
Best,
Damien
On 26/10/2012 13:12, Gildenhuys, E, Mej <egil at sun.ac.za> wrote:
>
> Good day,
>
> I hope this email finds you well. I am currently trying to evaluate my
> species modelling using independent data. I have followed the tutorial
> and manual, however, in the manual the same data is used for the
> independent data as the modelling data and consequently has the same
> name, where they differ in mine. The problem is that I do not know
> where/how to read in the coordinates of my independent data from which
> my model will be evaluated. I suppose in the tutorial example there is
> no need to read it in twice as it has the same name?
>
> Initial.State(Response = alldata5[,1], Explanatory = alldata5[,2:7],
> IndependentResponse = alldataH[,1], IndependentExplanatory =
> alldataH[,2:7], sp.name="halicacabum")
>
> ls()
>
> Models(GBM = T, No.trees = 2000,
>
> NbRepPA=2,
>
> strategy="random",
>
> coor=alldata5[,8:9],
>
> nb.absences=10000,
>
> DataSplit = 70,
>
> NbRunEval = 4,
>
> KeepPredIndependent=T,
>
> Roc = T,
>
> Optimized.Threshold.Roc=T,
>
> TSS=T,
>
> VarImport=T
>
> )
>
> If I run this model I get the following error:
>
> -----------------------------------
>
> Modelling summary
>
> -----------------------------------
>
> Number of species modelled : 1
>
> halicacabum
>
> numerical variables : mtcoldm, mtwarmm, pcoldq, pdrym,
> pwarmq, ts
>
> number of evaluation repetitions : 4
>
> number of pseudo-absences runs : 2
>
> models selected : GBM
>
> total number of model runs : 10
>
> -----------------------------------
>
> ##### halicacabum #####
>
> ##### pseudo-absence run 1 #####
>
> Model=Generalised Boosting Regression
>
> 2000 maximum different trees and lambda Fold Cross-Validation
>
> Error in TSS.Stat(Misc) : subscript out of bounds
>
> In addition: Warning message:
>
> In rbind(Misc, a) :
>
> number of columns of result is not a multiple of vector length (arg 1)
>
> Thanx!
>
> Enelge
>
>
>
> _______________________________________________
> Biomod-commits mailing list
> Biomod-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20121026/126ecfe2/attachment-0001.html>
More information about the Biomod-commits
mailing list