[Biomod-commits] Re : prevalence and pseudoabsences

Brenna Forester forestb at students.wwu.edu
Fri Apr 22 20:49:24 CEST 2011

Thanks Bruno & Wilfried,

So to clarify: I run pseudo.abs - in my case as so:

PA1 <- pseudo.abs(coor=Sp.Env[,2:3], status=Sp.Env[,1], strategy="random",
                env=Sp.Env[,4:10], nb.points=2736, species.name="Rhodiola",
                add.pres=F, create.dataset=T, plot=T, pcol="red", acol="grey80")

This creates two objects, "PA1" (a vector of cell numbers chosen as absences) and "Dataset.Rhodiola.random.partial", a dataframe of coordinates and "status" (zero).

I would then create a new dataset that has just my presence records (304) and these 2736 absences.  I would run that dataset (Sp.Env.PA1) in the Intial.State() and Models() functions, for example, as so:

Initial.State(Response=Sp.Env.PA1[,c(1)], Explanatory=Sp.Env.PA1[,4:10],
                         IndependentResponse=NULL, IndependentExplanatory=NULL,

Models(GLM = T, TypeGLM = "simple", Test = "AIC", GBM = T, No.trees = 5000,
              GAM = T, CTA = T, CV.tree = 100, ANN = T, CV.ann = 5, SRE = F, FDA = T,
              MARS = T, RF = T, NbRunEval = 10, DataSplit = 70, Yweights=NULL,
              NbRepPA=0, Roc=T, Optimized.Threshold.Roc=T, Kappa=T, TSS=T,
             KeepPredIndependent = F, VarImport=5)

I keep NbRepPA = 0 so it uses the entire dataset to evaluate the model, maintaining my prevalence at 0.1 (304 presence records/3040 total records in the dataset).

I think I am correct on everything to this point?

So my question is: I want to do 5 PA pulls (as I would if I ran it in the Models() function, NbRepPA = 5), maintaining my 0.1 prevalence.  But I would then have run Models() five times on 5 datasets (each with different PA pulls).  How does BIOMOD create a final model when using PA pulls (e.g. NbRepPA = 5) within the Models() function, and can I replicate that when I run my PA pulls manually as above?

I hope this isn't too confusing!
Thank you!

From: Bruno Lafourcade [brunolafourcade at aol.com]
Sent: Thursday, April 21, 2011 11:37 PM
To: wilfried.thuiller at ujf-grenoble.fr; Brenna Forester
Cc: biomod-commits at r-forge.wu-wien.ac.at
Subject: Re : [Biomod-commits] prevalence and pseudoabsences

Hi Brenna,

The pseudo-absence procedure within the Models function is automated and generates a
weighting to give a prevalence of 0.5 for each run.

To make sure that the prevalence doesn't change, you have to build your own pseudo-absence
data outside of the Models function (even prior to Initial.State). In that way, the Models function
will not recognize your data as being pseudo.abs and will not weight them, just like for any
standard input data.

Use the pseudo.abs() function to this matter. Don't hesitate to ask for details on how to use it.


Bruno Lafourcade
Statistical tools engineer

Laboratoire d'Ecologie Alpine, bureau 308
CNRS - UMR 5553, 2233 rue de la piscine
38400 Saint Martin d'Hères

-----E-mail d'origine-----
De : Wilfried Thuiller <wilfried.thuiller at ujf-grenoble.fr>
A : Brenna Forester <forestb at students.wwu.edu>
Cc : biomod-commits at lists.r-forge.r-project.org <biomod-commits at r-forge.wu-wien.ac.at>
Envoyé le : Vendredi, 22 Avril 2011 7:09
Sujet : Re: [Biomod-commits] prevalence and pseudoabsences

Dear Brenna,

Yes and no...

If you do not ask for pseudo-absence (NbPA=0), there is no weigthing and all your pseudo-absence will be used at once. Prevalence = 0.1
If you add NbPA = 3040 (or more), yes, there is. The prevalence = 0.5

Does it help?

Le 22 avr. 2011 à 00:53, Brenna Forester a écrit :


I see in the "Presentation Manual for BIOMOD" (page 18) the following statement: "In all procedures, BIOMOD ensures that the prevalence of the original data is conserved in the calibration and evaluation datasets."

I have 304 presence records and am running my pseudoabsence pulls with 3040 absences (a prevalence of 0.1).  The number of pixels in my study area is 6808.

More information about the Biomod-commits mailing list