Statistical Analysis of Spatial and Observational Ecological Data in R (REcoStat) - CANCELLED

Course content

The course provides an introduction to statistical analysis in ecology using the programming language R.  The course focuses primarily on comparative analyses and observational data, which pose different challenges than designed experiments. The exercises will give the students an overview of the tools and packages available for analyzing and visualizing ecological data, and they will work independently on data analysis projects that focus on giving them the tools needed for independent analysis. Students are recommended to take the course during or shortly prior to beginning their MSc thesis project.

Learning outcome

After completion of the course, the student is expected to be able to:


  • describe the basic elements of the R programming language
  • detail the statistical methods available for analysis of observational data
  • describe the issue of pseudoreplication and autocorrelation, and detail the possible methods to deal with it
  • know functions implemented in vegan R package for community ecological data analysis
  • know functions in the nodivR package for working with macroecological data with phylogenetic trees
  • know functions and data structures in packages sp and raster for spatial data
  • know functions in the ape package for phylogenetic analysis
  • know functions in the ggplot2 package for data visualization
  • know functions in the dplyr package for manipulation of data sets
  • describe the difference between frequentist and bayesian statistics



  • use R to load data sets and do basic data analysis tasks
  • program simple functions and simulations
  • use the R documentation to find solutions for coding problems
  • produce basic figures, such as scatter plots, histograms and bar plots for data visualization
  • test and summarize statistical models of ecological data
  • identify the assumptions of statistical tests and test if they are met
  • use standard linear regression, and derived techniques, such as spatial linear models, generalized linear models with different error families, phylogenetic regression, and random effects.
  • use the Rmarkdown syntax to produce a lab log of the analytical processes in a statistical analysis



  • identify the right packages and tools for their data and problem
  • work out how to solve new problems
  • understand the biological background and significance of different statistical tests and outcomes
  • critically debate and replicate analyses in published research papers

The teaching will consist of class-room teaching that blends lectures with practical exercises. The practical exercises will be supplemented with discussions of analyses and discussions of some published papers. Three times during the course, the students will work in groups to prepare a lab report detailing a statistical data analysis, written in Rmarkdown.

Handouts at the course

The students should be familiar with basic statistical terms, such as variance, mean, normal distribution, common linear regression, significance and hypothesis testing. No previous experience with R or statistical software is assumed. Students familiar with R must expect to experience some repetition, as this constitutes an important element in the course.

7,5 ECTS
Type of assessment
Written assignment
Assesment based on 2-4 reports that is delivered in the last week of the course. The final number of the reports that have to be made is presented by the course responsible at the beginning of the course.

The assesment is based on an overall evaluation of the submitted reports.

The project reports shall present the data, the problem and the statistical considerations. It must contain a section on the assumptions of the methods and of caveats. Results should be illustrated graphically. A short discussion of the biological relevance must be present.
All aids allowed
Marking scale
passed/not passed
Censorship form
No external censorship
Several internal examiners
Criteria for exam assessment

See learning outcomes.

Single subject courses (day)

  • Category
  • Hours
  • Preparation
  • 115
  • Lectures
  • 21
  • Practical exercises
  • 28
  • Colloquia
  • 7
  • Project work
  • 35
  • English
  • 206