sdm: a reproducible and extensible R package for species distribution modelling

  Рет қаралды 23,075

Biogeoinformatics

Biogeoinformatics

3 жыл бұрын

This is a lecture, followed by a practical session, about species distribution modelling and the sdm R package that has been developed by Babak Naimi and Miguel Araujo. This material was part of the ENM2020 online course that was organised by Town Peterson, and therefore, the video is available in the ENM2020 course channel as well ( • ENM2020 - W20T1 - sdm . The same video, however, is uploaded here for the subscriber and followers of the Biogeoinformatics channel.
Link to the article about the sdm R package published in Ecography:
onlinelibrary.wiley.com/doi/f...
To download the R script written during the live demo, use the following link:
www.dropbox.com/s/rid8jxsh673...
-------------------------------
For more information about me (Babak Naimi; the main author and developer of the sdm R package), please look at the following websites/links:
Homepage I: biogeoinformatics.org
Homepage II: r-gis.net
Google Scholar: scholar.google.com/citations?...
GitHub: github.com/babaknaimi
Twitter: / babaknaimi
LinkedIn: / babak-naimi-73026341
ORCiD: orcid.org/0000-0001-5431-2729

Пікірлер: 82
@saulopino8152
@saulopino8152 2 жыл бұрын
thank you very much I was very lost in the part of quantifying the importance of bioclimatic variables and your video helped me a lot
@yifenghu3808
@yifenghu3808 6 ай бұрын
Thank you so much for your great video!
@jalalkassout4226
@jalalkassout4226 3 жыл бұрын
Very nice to see another helpful tutorial on SDM package, Thank you dear Naimi. Can you please present a tutorial on predecting plant functional traits from an existing plant distribution models? Thank you in advance.
@rafaeu7904
@rafaeu7904 3 жыл бұрын
It is possible? How can we do this? very interesting.
@SundayAdebunmiADENIRAN
@SundayAdebunmiADENIRAN Ай бұрын
Really love this thank you
@danielosorio4989
@danielosorio4989 3 жыл бұрын
Great SDM tool!
@upheaveworker2108
@upheaveworker2108 10 ай бұрын
thanks for Sharing, really appreciate for newbie like me
@zaferislam935
@zaferislam935 3 жыл бұрын
Grear presentation
@abdelmutalabazrag3136
@abdelmutalabazrag3136 2 жыл бұрын
Thanks a lot for this tutorial. It really helped me to publish my first SDM using R, well appreciated. One question: Is there any code that I can use to split the response curve?. For example, instead of having 9 curves in one row, is it possible to have 3 rows (every 3 curves in one row). Thanks a lot.
@inbard8122
@inbard8122 11 ай бұрын
Hi, great video! Question - is there anyway to deal with spatial auto correllation (the presence of systematic spatial variation in a variable) with this package? Thank you
@user-op3gs4ml1r
@user-op3gs4ml1r 8 ай бұрын
Thank you for the great tutorial. Have one question, how to calculate the threshold maximizing the TSS/the maximum training sensitivity plus specificity threshold?
@qZoneful
@qZoneful 10 ай бұрын
Great video!, I have a question, how can i do a fine tuning and parameter selection for models such as glm, gam, rf and maxent?
@Bikgya
@Bikgya 5 ай бұрын
Great!! Video could you please make a video on the Biomod2 package?
@julkaditapause1774
@julkaditapause1774 5 ай бұрын
Thank you sir for making this useful video. I face error while trying to (raster)extractspg and bioc together
@farisayidakwa7024
@farisayidakwa7024 2 жыл бұрын
How do you incorporate other form of measurements outside presence/absence like abundance or any measurement like species density in this model?. Wondering if its the same or there are major changes to follow?
@inyookim1617
@inyookim1617 2 жыл бұрын
Thanks for the great tutorial. Have one question, how do I evaluate the ensemble model outcome(en)?, AUC, TSS and other stuffs.
@biogeoinformatics
@biogeoinformatics 2 жыл бұрын
You can use the evaluates function, put the sdmdata object as the first argument, and the raster output of ensemble as the second argument
@inyookim1617
@inyookim1617 2 жыл бұрын
@@biogeoinformatics thanks for the reply :) but have another question. I successfully ran the model, now looking through the outcomes and have one question. In the variable importance, is the metric based on the jackknife approach? and if not how are correlation test and auc test done?
@Blackpinks__1an__page
@Blackpinks__1an__page 3 жыл бұрын
Thanks a lot, it is a great job. I need some help please, it is very important for my PhD research work. I want to download Historical monthly weather data from Worldclim for 2010-2018 time period. And use this data for current prediction. Do you know R scripts for this data? Or how I can change CMIP5 data to CMIP6 weather data? Thanks in advance.
@funwithflags7506
@funwithflags7506 2 жыл бұрын
your doing a phd and cant use your brains to ask your academic staff
@endlessformsmostbeautiful8442
@endlessformsmostbeautiful8442 3 жыл бұрын
Hi, is there a way to bring in our own bias file that we created with sdmtools? it is asc file
@emmadeeks3104
@emmadeeks3104 2 жыл бұрын
brilliant tutorial! Apologies if I missed this, but do where can I find the code used in this tutorial? Thanks so much
@zainulabdin4466
@zainulabdin4466 2 жыл бұрын
I practiced the code so I have it in .R file. Let me know if you need it.
@julkaditapause1774
@julkaditapause1774 5 ай бұрын
@@zainulabdin4466bro i need it. It will be very helpful if you are able to provide me the code
@franciscoborges1590
@franciscoborges1590 3 жыл бұрын
Hello! I've been trying to figure out if you can plot the randomly generated background pseudo-absences from the sdmData object, but have yet to find or figure it out. Can someone help me, if it is indeed possible? Would be cool to see how the function is generating the new data. Thanks in advance.
@wyclifeoluoch9376
@wyclifeoluoch9376 2 жыл бұрын
Once you have the output of sdmData object, say d, you can convert it to data.frame object, extract species and coordinates columns, and filter where species == 0. df
@alexkiser4017
@alexkiser4017 24 күн бұрын
I'm having issues with spatrasters working in the ensemble function. The example code in the help section also runs into the same error. Any ideas on how to fix this? p2
@yadavghimirey
@yadavghimirey 3 жыл бұрын
thank you very much for this.. a little confusion with the gui(m) code though.. Which package needs to be installed for this code to work? I got lost at that point..
@yadavghimirey
@yadavghimirey 3 жыл бұрын
Actually I got the code to run but it keeps running for eternity and I have to abort r in order to stop it.. so there's a little problem.. not sure what makes it behave this way..
@biogeoinformatics
@biogeoinformatics 3 жыл бұрын
You can simply run installAll() which installs all required packages including those required by gui (gui requires shiny).
@wyclifeoluoch9376
@wyclifeoluoch9376 2 жыл бұрын
@@yadavghimirey I also think you are returning to console before closing the open shiny gui. You need to close the shiny gui first then come back to R console to continue with other codes.
@yadavghimirey
@yadavghimirey 2 жыл бұрын
@@biogeoinformatics Thank you very much
@yadavghimirey
@yadavghimirey 2 жыл бұрын
@@wyclifeoluoch9376 Thx! :)
@franciscoborges1590
@franciscoborges1590 3 жыл бұрын
How would you go about using the sdm function for more than 1 species? I provide the function an sp object with the coordinates but with a column with the species names instead of the occurrences being "1". The sdmData object runs smoothly and recognizes the number of species there. However, in the sdm function I use the same column and the sdmData object and I get an error: "Error in FUN(X[[i]], ...) : trying to get slot "presence" from an object of a basic class ("NULL") with no slots"
@biogeoinformatics
@biogeoinformatics 3 жыл бұрын
Did you generate background, i.e., put, for example, the bg=list(n=1000) argument in the sdmData function?
@franciscoborges1590
@franciscoborges1590 3 жыл бұрын
@@biogeoinformatics thank you for the reply! Yes, I have the background data stated in the sdmData object
@biogeoinformatics
@biogeoinformatics 3 жыл бұрын
@@franciscoborges1590 so, then please send the output of running head function on your input data: head(XXX), and the sdmData code you used that caused the error
@franciscoborges1590
@franciscoborges1590 3 жыл бұрын
@@biogeoinformatics The data I'm inputting for the sdmData is has the following head: head(occ1) " Species 1 maritima 2 maritima 4 maritima 5 maritima 6 maritima 7 maritima"" This was created from a dataframe with three columns: Species ; Longitude ; Latitude, and assigning the coordinates function. I believe this could be where my mistake lies but I'm unsure where. The sdmData code lies below: d
@tobycasey123456789
@tobycasey123456789 3 жыл бұрын
Hi Franciso, Not sure if you've got it sorted already but I had the same problem. Convert the 'species' names into numbers and it runs properly!
@sppervideeos4
@sppervideeos4 5 ай бұрын
By entering the density of occurrence of the species at certain points, I want to predict the density at which they can be seen at other points. Is this possible? Can you suggest any method?
@zuleymazarco7315
@zuleymazarco7315 2 жыл бұрын
Anyone else having trouble using predict function for maxent algorithm?
@ghaznainiqbal
@ghaznainiqbal Жыл бұрын
Me . Did you find any solution to that?
@nisaayob5857
@nisaayob5857 Жыл бұрын
Thank you for this video. May someone kindy assist, i am get this error trying to get slot "presence" from an object of a basic class ("NULL") with no slots in the modelling step
@babaknaimi
@babaknaimi Жыл бұрын
My guess is that your input data (generated by sdmData) is presence-only. Put the setting in the bg argument in the sdmData to have background generated
@babaknaimi
@babaknaimi Жыл бұрын
@UCqDtax1iPvWGBm-BGvraORA I would check the column names in points (make sure you would have one column contains presences as 1), also check d object to see if the name of species is the same as you used in formula in the sdm function
@nisaayob5857
@nisaayob5857 Жыл бұрын
@@babaknaimi Thank you so much, it works now. I truly appreciate it, sir.
@MayaRagesh
@MayaRagesh Жыл бұрын
SIR i need help. Kindly share your suggestion Iam using R 4.1.3 SDM was running properly but now predict function not working. An error appearing p1
@babaknaimi
@babaknaimi Жыл бұрын
I am updating the package but meanwhile, you may use a raster format with extension of .grd, so use: p1
@ghaznainiqbal
@ghaznainiqbal Жыл бұрын
@@babaknaimi I Tried .grd extension but it shows( Error in o[[id[j]]] : subscript out of bounds). Any Solution :)
@josemiguelvilalopez909
@josemiguelvilalopez909 Жыл бұрын
@@babaknaimi hi! I have the same problem. Is there any update yet, or any planned date? Thank you very much!
@mayamaya-lr1sy
@mayamaya-lr1sy 2 жыл бұрын
SIR I HAVING THE ISSUE IN THE CROPING STEP spg
@julkaditapause1774
@julkaditapause1774 5 ай бұрын
Can’t we used the uncropped predictors in prediction?
@Z-Animals
@Z-Animals 2 жыл бұрын
please help me, how can i fix "Error: cannot allocate vector of size 12.0 Gb"
@samitkafle2433
@samitkafle2433 Жыл бұрын
How can we get evaluation for ensemble one TSS and ROC vakue ?
@DhaneeshB
@DhaneeshB 2 жыл бұрын
Error in loadNamespace(x) : there is no package called ‘devtools’ ............ how can I install Babknaimi sdm to my r studio
@yerichoberhanu4331
@yerichoberhanu4331 2 жыл бұрын
I am working to model species distribution using R with HP pc, Cori 7, 8th generation, RAM 8GB, processor 1.99 GB , while my PC does not give results. What is the minimum capacity of PC to run SDM?
@zainulabdin4466
@zainulabdin4466 2 жыл бұрын
I got i5 9th gen and it works perfectly fine for me.
@nisaayob5857
@nisaayob5857 Жыл бұрын
May someone please help. Does anyone know how to get the rcurve for the ensemble model?
@biogeoinformatics
@biogeoinformatics Жыл бұрын
I will add the possibility in the new version
@erhanilter720
@erhanilter720 3 жыл бұрын
When I try to "filter function", I take an error "%>%" function is not found. How can I fix it.
@shacokinze
@shacokinze 3 жыл бұрын
you probably need to install dplyr
@AbidAli-wr6dz
@AbidAli-wr6dz Жыл бұрын
Hi, I have a problem in coding as "sp" is my occurrence, vars are selected bioclimatic variables after the collinearity check. data
@babaknaimi
@babaknaimi Жыл бұрын
Convert sp to a SpatialPointsDataFrame
@AbidAli-wr6dz
@AbidAli-wr6dz Жыл бұрын
Thanks, It's work now!
@Igy-kn3tx
@Igy-kn3tx 7 ай бұрын
Can an r3PG model be included in an sdm model in R?
@dakshsingh57
@dakshsingh57 Жыл бұрын
Hi Everyone, did anyone tried running this -- m
@biogeoinformatics
@biogeoinformatics Жыл бұрын
In your code, there is no sense in using parallel as you only have one method and one replication, though I don't think it is the reason for crashing. It could be related to the Java run time, rJava, or even lack of memory. The first step is to see if it works appropriately in a non-parallelised code
@dakshsingh57
@dakshsingh57 Жыл бұрын
@@biogeoinformatics Thank you for your response - I tried the code without parallel and just kept maxent it crashed as well. The R studio crashes without any error message (only when maxent is added in the code) for other methods the code works well. At last I ran the script in R (not studio) the code worked. Surprisingly the same thing is not working in studio. I was able to run the script in R 4.2.2. Thank you for this efficient code !
@MayaRagesh
@MayaRagesh Жыл бұрын
I am using the {sdm} package to do the species distribution modelling of invasive species. The {vifcor} was done succesfully and the variables(rasters) with high correlation were excluded. I am unable to compile my rasters(bioclim variables, elevation , ndvi) , occurance data into the {sdmData} object. Below is my code and error. d sp
@babaknaimi
@babaknaimi Жыл бұрын
Convert your species data to a SpatialPointsDataFrame
@MayaRagesh
@MayaRagesh Жыл бұрын
@@babaknaimi class(sp) [1] "data.frame" Sir can you please tell me the code used for it
@MayaRagesh
@MayaRagesh Жыл бұрын
@@babaknaimi I have converted species data to spatial data frame sir > class(spwc) [1] "sf" "data.frame" > spwc Simple feature collection with 32 features and 1 field Geometry type: POINT Dimension: XY Bounding box: xmin: 76.64554 ymin: 10.49855 xmax: 76.74306 ymax: 11.0425 CRS: NA. But even now I am facing issue sir > d
@babaknaimi
@babaknaimi Жыл бұрын
You need to convert it to SpatialPointsDataFrame (not sf) coordinates(sp)
@felipeespinoza8647
@felipeespinoza8647 2 ай бұрын
Hi! I'm having a repetitive error related to the 'newdata' part in the prediction. I followed every step in the tutorial, but it gives me: d
@biogeoinformatics
@biogeoinformatics 2 ай бұрын
It was a problem in the predict function that has been fixed in the new version. Install the latest version of the sdm package!
@felipeespinoza8647
@felipeespinoza8647 2 ай бұрын
@@biogeoinformatics Thank you, it solved the problem of the matching number of cells, but now when I run the models (m), Maxent models don't work but the rest of the algorithms work, can you give me an insight on that?
@biogeoinformatics
@biogeoinformatics 2 ай бұрын
@@felipeespinoza8647 Maxent requires rJava in R and Java on your machine (OS). You need to first install JDK on your machine (not within R; on your operating system), then it should work. You may need to restart R. You can download JDK from here: www.oracle.com/java/technologies/downloads/
@felipeespinoza8647
@felipeespinoza8647 2 ай бұрын
I did that already, and it as working, but after installing the latest version I get this error: > m2 m2 class : sdmModels ======================================================== number of species : 1 number of modelling methods : 1 names of modelling methods : maxent replicate.methods (data partitioning) : subsampling number of replicates (each method) : 3 toral number of replicates per model : 3 (per species) test percentage (in subsampling) : 30 ------------------------------------------ model run success percentage (per species) : ------------------------------------------ method species ---------------------- maxent : 0 % ################################################################### Error in if (wtest == "test.dep") cat("model Mean performance (per species), using test dataset (generated using partitioning): ") else if (wtest == : missing value where TRUE/FALSE needed
@eeeLab-kk2il
@eeeLab-kk2il Жыл бұрын
p
@sciencepakistan4250
@sciencepakistan4250 9 ай бұрын
Kindly add a new video as we have now CMIP 6 data.
@sanadragab7555
@sanadragab7555 9 ай бұрын
I want sdm code quickly pls
sdm R package: species distribution modelling
56:56
Biogeoinformatics
Рет қаралды 27 М.
Stanford's FREE data science book and course are the best yet
4:52
Python Programmer
Рет қаралды 673 М.
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 50 МЛН
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 40 МЛН
Three strategies to tackle Big Data in R and Python
27:50
rasmusab
Рет қаралды 1,6 М.
ENM2020 - W20T1 - sdm
2:07:21
A. Townsend Peterson
Рет қаралды 7 М.
Species distribution Modelling - GeoHero
10:17
GeoHero
Рет қаралды 2,6 М.
Theory I: Ecological niches and geographic distributions
40:16
How to interpret (and assess!) a GLM in R
17:36
Chloe Fouilloux
Рет қаралды 25 М.
Introduction to Species Distribution Modeling Using R
43:34
weecology
Рет қаралды 31 М.
Module 1 - Introduction to Species Distribution Modelling
6:57
GU eResearch
Рет қаралды 16 М.
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 50 МЛН