<html><head><base href="x-msg://1/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Brenna,<div><br></div><div><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div ocsi="0" fpstyle="1"><div style="direction: ltr; font-family: Helvetica; color: rgb(0, 0, 0); font-size: 10pt; ">Thanks Bruno &amp; Wilfried,<br><br>So to clarify: I run pseudo.abs - in my case as so:<br><br><font size="2"><span style="font-family: 'Courier New'; ">PA1 &lt;- pseudo.abs(coor=Sp.Env[,2:3], status=Sp.Env[,1], strategy="random",<br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">env=Sp.Env[,4:10], nb.points=2736, species.name="Rhodiola",<br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">add.pres=F,</span><span style="font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>create.dataset=T, plot=T, pcol="red", acol="grey80")</span></font><br><br>This creates two objects, "<span style="font-family: 'Courier New'; ">PA1</span>" (a vector of cell numbers chosen as absences) and "<span style="font-family: 'Courier New'; ">Dataset.Rhodiola.random.partial</span>", a dataframe of coordinates and "status" (zero).<br><br>I would then create a new dataset that has just my presence records (304) and these 2736 absences.&nbsp; I would run that dataset (<span style="font-family: 'Courier New'; ">Sp.Env.PA1</span>) in the<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">Intial.State()</span><span class="Apple-converted-space">&nbsp;</span>and<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">Models()<span class="Apple-converted-space">&nbsp;</span></span>functions, for example, as so:<br><br><span style="font-family: 'Courier New'; ">Initial.State(Response=Sp.Env.PA1[,c(1)], Explanatory=Sp.Env.PA1[,4:10],<br></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">IndependentResponse=NULL,</span><span style="font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>IndependentExplanatory=NULL,<br></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">sp.name="Rhodiola")</span><br><br><span style="font-family: 'Courier New'; ">Models(GLM = T, TypeGLM = "simple", Test = "AIC", GBM = T, No.trees = 5000,<br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">GAM = T, CTA = T,<span class="Apple-converted-space">&nbsp;</span></span><span style="font-family: 'Courier New'; ">CV.tree = 100, ANN = T, CV.ann = 5, SRE = F, FDA = T,<span class="Apple-converted-space">&nbsp;</span><br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">MARS = T, RF = T,</span><span style="font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>NbRunEval = 10, DataSplit = 70, Yweights=NULL,</span><span style="font-family: 'Courier New'; "><br></span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">NbRepPA=0,<span class="Apple-converted-space">&nbsp;</span></span><span style="font-family: 'Courier New'; ">Roc=T, Optimized.Threshold.Roc=T, Kappa=T, TSS=T,<br>&nbsp;</span>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">KeepPredIndependent = F,</span><span style="font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>VarImport=5)</span><br><br>I keep<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">NbRepPA = 0<span class="Apple-converted-space">&nbsp;</span></span>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).<br>I think I am correct on everything to this point?<br></div></div></span></blockquote><div><br></div><div>Yes, you are correct.&nbsp;</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div ocsi="0" fpstyle="1"><div style="direction: ltr; font-family: Helvetica; color: rgb(0, 0, 0); font-size: 10pt; ">So my question is: I want to do 5 PA pulls (as I would if I ran it in the<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">Models()<span class="Apple-converted-space">&nbsp;</span></span>function,<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">NbRepPA = 5</span>), maintaining my 0.1 prevalence.&nbsp; But I would then have run<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">Models()<span class="Apple-converted-space">&nbsp;</span></span>five times on 5 datasets (each with different PA pulls).&nbsp; How does BIOMOD create a final model when using PA pulls (e.g.<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">NbRepPA = 5)</span><span class="Apple-converted-space">&nbsp;</span>within the<span class="Apple-converted-space">&nbsp;</span><span style="font-family: 'Courier New'; ">Models()</span><span style="font-family: 'Courier New'; "><span style="font-family: Helvetica; "><span class="Apple-converted-space">&nbsp;</span>function, and can I replicate that<span class="Apple-converted-space">&nbsp;</span></span></span>when I run my PA pulls manually as above?<br></div></div></span></blockquote><div><br></div><div>There is no final model when using several PA sets. There are as many "final models" as PA sets.&nbsp;</div><div>If you want to use several sets of PA yourself, make predictions from every model (using the Projections function for instance on the overall area). Then you'll need to combine them yourself.&nbsp;</div><div>There are several alternatives for combining projections from different models from different PA sets and from different repetitions from cross-validation:</div><div><br></div><div>Either you create a simple average and standard deviation from projections in probability values. You can then derive a confidence interval if you want.</div><div>You could also perform a weighted sum using weights derived from TSS or ROC for instance. It will give more weights to the best models (from the cross-validation column in Evaluation.results.TSS).&nbsp;</div><div>You could also perform what we usually call a committee averaging where you let the models vote for a presence or an absence. For this, you do not use the probability of occurrence anymore, but rather the presence-absence data directly. You then sum the presence-absences maps. If you have 5 repetitions, 5 models and 5 sets of PA, you thus have at maximum 125. When the sum if equal to 125, it means all repetitions, PA and models agree to say this is a presence, and when you got zero, it means the reverse obviously. Between 0 and 125 will give you the probability of agreement from the models for an absence (after rescaling everything by 125 for instance). This ensemble approach is very close to the Bayesian philosophy with posterior probabilities. I really like this approach, much better than looking at probability of occurrences themselves.&nbsp;</div><div><br></div><div>Now, I am not entirely sure why you want to keep your prevalence. Regression like models are not really good with artificial unbalanced dataset (prevalence different than zero). They are supposed to work well if the prevalence is the true prevalence of the species. This is the case with a perfect stratified sampling, but this is absolutely not when using random sets of pseudo-absence.&nbsp;</div><div>Therefore, the results are usually anyway similar. The main difference being the "true" probability of the models which will be higher for the pseudo-absence are downweighted. however, when they are transformed between 0 and 1, results are usually very similar.</div><div>I think Witz and Guisan recently show that using weighted pseudo-absence was better. We also have a paper close to be accepted with Methods in Ecology and Evolution showing the same with virtual datasets.&nbsp;</div><div><br></div><div>Hope it helps,</div><div><br></div><div>Wilfried</div><div><br></div><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div ocsi="0" fpstyle="1"><div style="direction: ltr; font-family: Helvetica; color: rgb(0, 0, 0); font-size: 10pt; "><br>I hope this isn't too confusing!<span class="Apple-converted-space">&nbsp;</span><br>Thank you!<br>Brenna<br><br><br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF114927" style="direction: ltr; "><font color="#000000" face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space">&nbsp;</span>Bruno Lafourcade [brunolafourcade@aol.com]<br><b>Sent:</b><span class="Apple-converted-space">&nbsp;</span>Thursday, April 21, 2011 11:37 PM<br><b>To:</b><span class="Apple-converted-space">&nbsp;</span><a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a>; Brenna Forester<br><b>Cc:</b><span class="Apple-converted-space">&nbsp;</span><a href="mailto:biomod-commits@r-forge.wu-wien.ac.at">biomod-commits@r-forge.wu-wien.ac.at</a><br><b>Subject:</b><span class="Apple-converted-space">&nbsp;</span>Re : [Biomod-commits] prevalence and pseudoabsences<br></font><br></div><div></div><div><font color="black" face="arial" size="2"><font color="black" face="arial" size="2"><div><br></div><div><font face="Arial, Helvetica, sans-serif">Hi Brenna,<span class="Apple-converted-space">&nbsp;</span><br><br>The pseudo-absence procedure within the Models function is automated and generates a<br>weighting to give a prevalence of 0.5 for each run.<br><br>To make sure that the prevalence doesn't change, you have to build your own pseudo-absence<br>data outside of the Models function (even prior to Initial.State). In that way, the Models function<br>will not recognize your data as being pseudo.abs and will not weight them, just like for any<span class="Apple-converted-space">&nbsp;</span><br>standard input data.<br><br>Use the pseudo.abs() function to this matter. Don't hesitate to ask for details on how to use it.<br><br>Best,<br>Bruno<span class="Apple-converted-space">&nbsp;</span><br><br><br></font></div><div style="clear: both; ">-------<br>Bruno Lafourcade<br>Statistical tools engineer<br><br>Laboratoire d'Ecologie Alpine, bureau 308<br>CNRS - UMR 5553, 2233 rue de la piscine<br>38400 Saint Martin d'Hères<br>-------</div><div><br></div><div><br></div><div style="font-family: arial, helvetica; font-size: 10pt; color: black; ">-----E-mail d'origine-----<br>De : Wilfried Thuiller &lt;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a>&gt;<br>A : Brenna Forester &lt;<a href="mailto:forestb@students.wwu.edu">forestb@students.wwu.edu</a>&gt;<br>Cc : <a href="mailto:biomod-commits@lists.r-forge.r-project.org">biomod-commits@lists.r-forge.r-project.org</a> &lt;<a href="mailto:biomod-commits@r-forge.wu-wien.ac.at">biomod-commits@r-forge.wu-wien.ac.at</a>&gt;<br>Envoyé le : Vendredi, 22 Avril 2011 7:09<br>Sujet : Re: [Biomod-commits] prevalence and pseudoabsences<br><br><div id="AOLMsgPart_2_edb92e8f-d92e-4871-b43e-ec9efd37ba90"><div>Dear Brenna,</div><div><br></div><div>Yes and no...&nbsp;</div><div><br></div><div>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</div><div>If you add NbPA = 3040 (or more), yes, there is. The prevalence = 0.5</div><div><br></div><div>Does it help?</div><div>Wilfried</div><div><br></div><div><br></div><div><br></div><div><div>Le 22 avr. 2011 à 00:53, Brenna Forester a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div><div style="direction: ltr; font-family: Helvetica; color: rgb(0, 0, 0); font-size: 10pt; ">Hello,<br><br>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."<br><br>I have 304 presence records and am running my pseudoabsence pulls with 3040 absences (a prevalence of 0.1).&nbsp; The number of pixels in my study area is 6808.<br><br>From the above quote, I think that BIOMOD is maintaining the original prevalance of 0.1.&nbsp; Is that correct?&nbsp; I just want to be sure that there is no weighting of absence records (e.g. weighting to simulate a prevalence of 0.5).<br><br>Thank you,<br>Brenna<br></div>_______________________________________________<br>Biomod-commits mailing list<br><a href="mailto:Biomod-commits@lists.r-forge.r-project.org" target="_blank">Biomod-commits@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits</a><br></div></span></blockquote></div><br><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>--------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (0)4 76 51 44 97</div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email:&nbsp;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr" target="_blank">wilfried.thuiller@ujf-grenoble.fr</a><br>Personal website:&nbsp;<a href="http://www.will.chez-alice.fr/" target="_blank">http://www.will.chez-alice.fr</a><br>Team website:&nbsp;<a href="http://www-leca.ujf-grenoble.fr/equipes/emabio.htm" target="_blank">http://www-leca.ujf-grenoble.fr/equipes/emabio.htm</a><br><br>FP6 European MACIS project:&nbsp;<a href="http://www.macis-project.net/" target="_blank">http://www.macis-project.net</a><br>FP6 European EcoChange project:&nbsp;<a href="http://www.ecochange-project.eu/" target="_blank">http://www.ecochange-project.eu</a></div><div><br></div></span></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"></div><br></div><div id="AOLMsgPart_3_edb92e8f-d92e-4871-b43e-ec9efd37ba90" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "><pre style="font-size: 9pt; "><tt>_______________________________________________<br>

Biomod-commits mailing list<br>

<a href="mailto:Biomod-commits@lists.r-forge.r-project.org" target="_blank">Biomod-commits@lists.r-forge.r-project.org</a><br>

<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits</a><br>

</tt></pre></div></div></font></font></div></div></div></div></span><br class="Apple-interchange-newline"></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>--------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (0)4 76 51 44 97</div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email:&nbsp;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Personal website:&nbsp;<a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Team website:&nbsp;<a href="http://www-leca.ujf-grenoble.fr/equipes/emabio.htm">http://www-leca.ujf-grenoble.fr/equipes/emabio.htm</a><br><br>FP6 European MACIS project:&nbsp;<a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project:&nbsp;<a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div></span></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>