sdm R package: species distribution modelling

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • I recorded this video from my screen while I was explaining the solutions for an assignment I prepared for MSc students in the course global ecology and biodiversity at the University of Amsterdam. The assignment was about using the sdm package in R for modelling the geographical distribution of a species (Linx pardinus) in the current and future time given climate data. You can find the PDF file of the assignments as well as the data used in this video in the folder shared via the following Dropbox link:
    www.dropbox.co...
    sdm is an R package that is is a reproducible and extensible framework for species distribution modelling. You can find more information from the following link:
    www.biogeoinfor...
    Good luck,
    Babak Naimi

Комментарии • 67

  • @purityrima1366
    @purityrima1366 3 года назад +1

    Thank you Babak. very helpful video here. Exactly what I was looking for!

  • @adeebakhan1188
    @adeebakhan1188 5 лет назад +1

    Thank you so much sir for sharing this video....you always try to help others...
    very helpful tutorial specially for research scholars working in sdm domain.

  • @joaorafaelsilvasoares6608
    @joaorafaelsilvasoares6608 5 лет назад +2

    Thank you for providing such material! It helped me a lot!

  • @hyacinthewouyou9305
    @hyacinthewouyou9305 3 года назад +1

    Thanks for sharing. Wonderful

  • @michelbutterfly
    @michelbutterfly 5 лет назад +1

    Thanks for sharing this with us! Very good tutorial

  • @philippr8959
    @philippr8959 5 лет назад +1

    Good to see the mapview function in application.

  • @ValeriaAdamova
    @ValeriaAdamova 4 года назад +1

    Amazing! Thank you so much for your master class!

  • @betsywang2810
    @betsywang2810 4 года назад +1

    Thank you so much, this video is so practical and helpful!!! Amazing interaction-GUI, I like the mapview() too

  • @melaniecolon9175
    @melaniecolon9175 4 года назад +1

    Thank you so much for all your help!

  • @varvaravladimirova9277
    @varvaravladimirova9277 4 года назад

    FIY In the case of bootstrapping p-values for tests at the 0.05 the minimum number of samples is about 400 (so 399) while for a test at the 0.01 level it is 1500 so (1499).

  • @danielhagos235
    @danielhagos235 Год назад +1

    Great tutorial ever

  • @inyookim1617
    @inyookim1617 2 года назад +3

    Thanks for the great tutorial.
    Have one question, how do I evaluate the ensemble model outcome(en)?, AUC, TSS and other stuffs.

  • @syvfiqrahman
    @syvfiqrahman 5 лет назад +1

    more video on analysis like this please... thank you

  • @alexkiser4017
    @alexkiser4017 4 года назад +1

    I have been able to run the code with my data for my preliminary trials using lower bootstrap counts (

    • @ghaznainiqbal
      @ghaznainiqbal Год назад

      I'm having the same issue for Prediction (Error in o[[id[j]]] : subscript out of bounds). Any Solution ?

  • @emeliakusi9400
    @emeliakusi9400 4 года назад +3

    Thank you so much for this video. I love it. Is it possible to get the coordinates of both the presence and pseudo absence using the sdmData function? I want to plot a graph of absence and presence for my species distribution before I start the analysis.

    • @babaknaimi
      @babaknaimi 4 года назад

      Yes, you can use the coordinates function to get the coordinates.

    • @emeliakusi9400
      @emeliakusi9400 4 года назад

      @@babaknaimi OKay, thank you.

  • @thamnophis7324
    @thamnophis7324 4 года назад +1

    Thanks for the fantastic video! Is there a way to define the extent over which you would like to generate predictions? For instance, if I am only interested in predicting suitability over the United States, is there a way to to this in the model (to save on run time)?

    • @biogeoinformatics
      @biogeoinformatics  4 года назад

      You can simply use the predictors cropped within the United States as the newdata in the predict or ensemble function to get the predicted values for a specific area.

  • @alqu2222
    @alqu2222 5 лет назад +1

    you should start with the libraries that you are using to put the audiance in perspective of whatever workflow you are embarking on.

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад +1

      You right, however, this video was prepared for the students who were in my class, so they know the background and all the concepts behind whatever is discussed here. I just thought it might be useful for others who started exploring the sdm package and have some background.

  • @tinyikoshivambudr578
    @tinyikoshivambudr578 4 года назад

    very useful video, thanks alot

  • @GaneshPuri-hm4gr
    @GaneshPuri-hm4gr 3 года назад

    Thank you so much for this great video.
    Is the same process for categorical variable also?

  • @joseportillo217
    @joseportillo217 3 года назад +1

    And the Maxent? How we can implement Maxent in sdm package?

  • @shanshanchen1045
    @shanshanchen1045 2 года назад

    thank you for sharing this video, I wonder whether raster::getData()function downloading the present data?

  • @umarfarooqabdulwahab3220
    @umarfarooqabdulwahab3220 5 лет назад

    Hi Babak,
    Thanks for sharing this great tutorial. Any idea on how to generate partial dependence plots for predictor variables within the sdm package?

  • @Jacksonmrodrigues
    @Jacksonmrodrigues 5 лет назад

    Thank you for sharing it @Biogeoinformatics !! It is amazing!
    I was wondering while watching, would it be possible to predict suitability for agriculture production using sdm? In this case how could I adapt my case which is a polygon (large area of production) rather than points (single lat, and long) ?
    Thank you very much again.
    Subscribed √

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад +1

      I think you can simply generate random points over the polygons and assign the value of 1 to them. Then, you can add bg argument to the sdmData function (as I did in the video) to generate the background points (0s) over whole the study area randomly. I believe it would give you the suitability map you need.

    • @Jacksonmrodrigues
      @Jacksonmrodrigues 5 лет назад

      @@biogeoinformatics That is what I thought. I will try it out. Thank you again

  • @mayaammathilmanoharan1406
    @mayaammathilmanoharan1406 2 года назад

    Hello sir, First of all thank you so much for uploading this tutorial. it was very helpful. Sir i have a doubt sir here we are using CMIP5 DATA instead for uploading CMIP6 future climate data what should we do .

  • @gabrielaspriestersbach6541
    @gabrielaspriestersbach6541 Год назад

    Hello :)
    I have downloaded occurrence data manually from gbif and stored it in my directory as a .cvs file. I already read the records into r and started cleaning the data. I removed duplicated records and the records without coordinates. Now I wanted to keep only the records that are over the extent of my study area, which is part of south america. Any inputs on how do I do that? Nothing I tryed worked out...

  • @eikeu2801
    @eikeu2801 4 года назад +3

    Thank you for the great video and step-by-step explanation! Great help to get started. :)
    I am trying to follow but get stuck on the sdm() function.
    My code reads:
    m

    • @carolinareyes-puig5742
      @carolinareyes-puig5742 3 года назад +2

      same here, maybe did you solve the problem????

    • @metugene3016
      @metugene3016 3 года назад +1

      At the same point I had the same problem. Check the following points:
      If you are getting this error, when you run the getmethodNames('sdm') code, it means some packages are not installed. You should determine which packages are missing and install the missing ones.
      Check the required packages below:
      library(sdm)
      getmethodNames('sdm')
      Loading required package: sp
      sdm 1.0-89 (2020-04-22)
      Loading required package: dismo
      Loading required package: raster
      Loading required package: gbm
      Loaded gbm 2.1.8
      Loading required package: tree
      Loading required package: mda
      Loading required package: class
      Loaded mda 0.5-2
      Loading required package: mgcv
      Loading required package: nlme
      Attaching package: ‘nlme’
      The following object is masked from ‘package:raster’:
      getData
      This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
      Loading required package: glmnet
      Loading required package: Matrix
      Loaded glmnet 4.0-2
      Loading required package: earth
      Loading required package: Formula
      Loading required package: plotmo
      Loading required package: plotrix
      Loading required package: TeachingDemos
      Loading required package: rJava
      Loading required package: RSNNS
      Loading required package: Rcpp
      Loading required package: randomForest
      randomForest 4.6-14
      Type rfNews() to see new features/changes/bug fixes.
      Loading required package: rpart
      Loading required package: kernlab
      Attaching package: ‘kernlab’
      The following objects are masked from ‘package:raster’:
      buffer, rotated

  • @sublimexable
    @sublimexable 5 лет назад

    Thank You so much!!!...

  • @najlascheidegger5101
    @najlascheidegger5101 3 года назад

    Hi! thank you so much for the great video!^^
    Is that possible to create a background points radius (buffer) around the presence data?

  • @alexkiser4017
    @alexkiser4017 4 года назад

    Thanks for posting this video, very helpful. I have a question about using Maxent as a model when setting up the sdm. Under the getmethodNames(), maxent is listed as an option. I have downloaded the required packages and can run the maxent as a stand alone. However, when I attempt to select it as a model, it will return only NA and says the maxent did not run. Do you know how to incorporate this into the series of models? Thanks

    • @babaknaimi
      @babaknaimi 4 года назад

      Did you put the maxent.jar file in the right place (or in the working directory for the first time you use maxent method)?

    • @alexkiser4017
      @alexkiser4017 4 года назад

      @@babaknaimi Thanks for getting back to me. I have used.
      jar

    • @babaknaimi
      @babaknaimi 4 года назад

      @@alexkiser4017 This returns the location of the folder where the file should be located. You need then check file.exist(jar) and if it is TRUE, then it should work. Alternatively, you can simply put maxent.jar in the working directory where you fit the sdm function (only for the first time), then the sdm function copies the file into the right location. It should work then if rJava and dismo are installed appropriately. Good luck

  • @lwalston4470
    @lwalston4470 2 года назад

    Hi Babak - great video! I am struggling to get maxent to work with this sdm package. The maxent model completes training but when I apply predictions, I get the following error message: "Error in .local(object, ...) : Error in prediction....!" Any idea why that error is occurring?

  • @roxirisauxiliadora
    @roxirisauxiliadora 4 года назад

    Hi, good afternoon. I was wandering if is possivel to create a sdmdata with two independent data set, one for training and the other for testing. I try to do it but it gave this error and i´m having troubel to correct it:
    prueba

    • @LimbazhuKefiirs
      @LimbazhuKefiirs 4 года назад

      Hi,
      I encountered the same problem. Did you find a solution?

  • @jkpanopio9280
    @jkpanopio9280 5 лет назад

    Hi Mr. Naimi, I used the sdm package but I am encountering an error in the predict function after I changed one variable as a factor in the sdmData function and the model.
    The error is Error in names(x)

    • @jkpanopio9280
      @jkpanopio9280 5 лет назад

      Here is a copy of my script.
      # MODEL TRAINING
      d

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад

      Sorry, I have no idea about this error. Without looking at a reproducible code, it would be difficult to understand what caused the error.

    • @jkpanopio9280
      @jkpanopio9280 5 лет назад

      @@biogeoinformatics Thank you for the quick response.
      I have solved the initial error although another one popped up.
      p1

  • @abkiyodida3551
    @abkiyodida3551 Год назад

    Dear Dr. Babak Naimi,
    Thank you for your very teachable tutorial. please could you get me the scripts you are using on this live tutorial? Thank you.

  • @AR_Wald
    @AR_Wald 4 года назад +1

    Can you tell me what the meaning of the '10 criteria' at 28:36 ? I cannot find any information regarding to it.

    • @babaknaimi
      @babaknaimi 4 года назад

      This refers to the threshold optimisation criteria that would be used to find the best threshold for converting the predicted probability of occurrence to presence-absence value. The sdm package uses 10 different criteria to find the threshold. For example, the second criterion (max[sensitivity+specificity]) finds the threshold under which the value of specificity + sensitivity is maximised (i.e., TSS is maximised). The threshold for each criterion is then used to calculate different metrics (e.g., sensitivity, specificity, TSS, Kappa, etc.) that are presented in the threshold-dependent table.

  • @bipinkumaracharya2422
    @bipinkumaracharya2422 5 лет назад

    Could you please let me know how I can plot the factor variable for instance landcover using rcurve() function of sdm package. Thanks.

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад

      if you have the landcover variable used in the model as a factor, the rcurve generates the response as a barplot

  • @betsywang2810
    @betsywang2810 4 года назад

    Do we need to do the vifcor() for the CHIP5 variables? and see if the variables are collinear?

    • @babaknaimi
      @babaknaimi 4 года назад

      No, you check this for the variables that you use to fit SDMs.

    • @betsywang2810
      @betsywang2810 4 года назад

      @@babaknaimi Thank you so much

  • @CTashi-jj5mz
    @CTashi-jj5mz 5 лет назад

    Firstly, Thank you very much for the tutorial.
    I just have a question regarding the ensemble function and the predict funtion. I have the packages loaded but I get this message when the command is done running.
    Error in .getGDALtransient(x, filename = filename, options = options, :
    filename exists; use overwrite=TRUE
    "Error in .getGDALtransient(x, filename = filename, options = options, :
    filename exists; use overwrite=TRUE
    In addition: Warning message:
    In .local(x, newdata, filename, ...) :
    method is not identified, therefore the default ("weighted") is considered!"
    if anyone knows why I am getting the error please let me know.

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад +1

      Hi, when you specify a filename that already exists, you get such error unless you add the argument, overwrite = T;
      In the setting arguement in the ensemble function, you can specify the method = "weighted" or "unweighted", if you specify something else, "weighted" is considered.

  • @yuliialeshchenko6185
    @yuliialeshchenko6185 Год назад

    Hi! Does someone know why I have such an error after trying to use predict function?
    Error in .updateGDAL(object, v, cell, band, setminmax) : no longer supported

    • @babaknaimi
      @babaknaimi Год назад

      It is because of the changes in GDAL library. I am fixing in the new version. Meanwhile, you may use the native raster format in the raster package, a file with extension of .grd

  • @DibyenduBiswasnature
    @DibyenduBiswasnature 4 года назад

    Hello Sir, I am new to R. I want to do an SDM (GLM) for vulture species with its presence points only w.r.t. predictable variables, of which I have the raster layers. Kindly help me to do it in R.

    • @ravikumar-vr6zm
      @ravikumar-vr6zm 4 года назад

      ruclips.net/p/PLscTjKy2_0Klj6j5t7GD4BZ_MUQ3nJEOw

  • @VishalKumar-nn2ch
    @VishalKumar-nn2ch Год назад

    hello sir, this was very helpful for me. The prolem is I am not getting all the ML methods in getmethodNames() like svm,cart,rf. Please help me to add them into mine.

    • @babaknaimi
      @babaknaimi Год назад

      Use installAll() to install all the required packages

  • @eduardob74
    @eduardob74 5 лет назад

    Is possible to save the object d and m to save time for other session?

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад

      Yes, you can use the function write.sdm. Then read.sdm can be used to read them back.

    • @biogeoinformatics
      @biogeoinformatics  5 лет назад

      Yes, you can use the function write.sdm to save the objects, and later use the read.sdm function to read them back.