Programme
Introduction
Background information on
R
andRStudio
(🔗slides)More info, if needed:
Interactive tutorial for setting up R, RStudio and installing the tidyverse https://learnr-examples.shinyapps.io/ex-setup-r/
Intro book: https://moderndive.com/1-getting-started.html
Participants’ familiarity with R and R-packages.
Presentation of the package’s website: https://umr-astre.pages.mia.inra.fr/sit/.
- Central venue for documentation, code, questions, installation instructions, tutorials, everything.
Overview of the
sit
R
package.- Introductory toy example on the package’s home page Two main stages: importing data; retrieving results.
- Installation of
sit
. Go through installation steps and make sure everyone has it running.
Introduction to R and RStudio (Sow)
Package Documentation.
- Reference pages and vignettes are accessible from the web and from within R. Demo.
MRR data templates
Overview of the legacy Excel template.
A single point-release only. Rings as approximation to distances. No adjustment for non-uniform spatial arrangement of traps.
Overview of
sit
’s data model, to establish nomenclature. Works with GPS coordinates and computes distances. Improves or extends some of the calculations. In general, should give similar results.
Importing MRR data into sit
Basic data manipulation in
R
(🔗slides)Filtering observations, selecting and renaming variables, reshaping tables, tidy format. A more realistic example.
Practical session
Objective: get your data into a
sit
object. Verify correctness. If no own data, reproduce the introductory example in your computer.If not finished, finish at home and review in the morning.
Special data types: geographical coordinates; coordinate reference systems; dates and times. (🔗web)
Take-home tasks (optional)
- Interactive tutorials about filtering observations and summarising data:
Statistical Data analysis using the sit
R
package
The
sit
object. Descriptive and graphical summaries. Extracting the data. Saving and loading.Get Started Section 4.4: Print the
sit
object for a concise description. Re-use the import functions to extract the corresponding data from thesit
object.Get Started Section 5: Saving and loading.
Retrieving Results Section 1: Overview of the experimental set up
Retrieving Results Section 2: Extraction functions.
Retrieve results on competitiveness, survival and dispersion of sterile males and on density of the wild population.
- Retrieving Results Section 3: SIT results.
Practical session with real MRR data from participants or from the
sit_prototype
in the package.- Objective: make a script that loads the data, produces the sit object and saves it for back-up. Make a second script that performs some analyses.
Data analysis workflow
Getting help and helping. Building a community of users. The
sit
website. Reporting bugs, issues and feature requests in the development platform. Asking for and providing support in the mailing list.Make a CRU user account in order to log into Forgemia.
Subscribe to the mailing list
Making a statistical report with Rmarkdown. Manage project materials using
RStudio
projects.Getting Started Section 6: Reproducing results.
R Markdown introduction by RStudio. https://rmarkdown.rstudio.com/lesson-1.html
Continue to lesson 2: how it works.
Demonstration using a quick example with
sit
. Make a RMarkdown document and pick parts from the introductory example in Getting Started.
References:
Hadley Wickham and Garrett Grolemund (2017) R for Data Science. Chapter 27: R Markdown
Hadley Wickham and Garrett Grolemund (2017) R for Data Science. Chapter 8: Workflow: projects
Rafael A. Irizarry (2021)Introduction to Data Science. Chapter 40: Reproducible projects with RStudio and R markdown
Video Tutorial: 7-3 Interactive Data Analysis - Converting R Notebooks into R Markdown Documents
Guided practical session
Objective: set up a full project analysis template from reading data from files, to producing the analytical report in RMarkdown. Use your own data or the demonstration files provided in the package.
Template project produced live during the session (🡇zip)
Data analysis of pilot-trial data: population suppression trials
Principles of data management (🔗slides)
Conclusions
Advantages of the R-package over the Excel template:
- Support multiple release points
- Support areal releases
- Adjustment for non-uniform arrangements of traps
- Work with precise coordinates and distances rather than rings
- Programmable and reproducible analyses
- No need to manually tweak formulas and tables with the risk of forgetting something and getting wrong results.
Perspectives:
The package tries to provide reasonable defaults to facilitate retrieving typical results, while providing enough flexibility to conduct more advanced analyses.
Pooling vs no-pooling: partial pooling using random effects models.
Statistical inference: uncertainty of estimates (beyond point estimates), joint modelling of multiple parameters.
Integrate new methods and models in the package.