Skip to content

Implementing a Generalized Linear Mixed Effects Model (GLMM) on a Before-After-Control-Impact (BACI) study design related to coastal dune restoration

Notifications You must be signed in to change notification settings

idiv-biodiversity/BACI_GLMM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository contains the R scripts used for performing the analysis in the article:

Pardini, E. A., Parsons, L. S., Ştefan, V., & Knight, T. M. (2018). GLMM BACI environmental impact analysis shows coastal dune restoration reduces seed predation on an endangered plant. Restoration Ecology, 26(6), 1190-1194.

Link to article on Wiley Online Library here.

The dataset is uploaded with a DOI on zenodo.org, and it can be downloaded from here. Use the script get_data.r to download the data and its metadata.

How to use this repository

- Clone or download

You can download or clone the repository then run the scripts using the BACI_GLMM.Rproj file (R and R Studio are needed).

For cloning, run this in a terminal (git should be installed):

git clone https://github.com/idiv-biodiversity/BACI_GLMM.git

First run the script get_data.r to download the data from zenodo.org. The script is doing some renaming of the variable names and of the data file as well so that it corresponds with those in the analysis script GLMM_BACI_public.R

- Install older versions of R and packages

For increasing reproducibility, one should install the older version of R (3.4.2) and also the older packages.

For installing multiple versions of R on a operating system see these resources:

In the table package_table.txt one can find the package names, their versions and their CRAN archive url. These are the packages listed by the command sessionInfo() in the script GLMM_BACI_public.R.

For example to install the package 'lsmeans', version '2.27-2', one can do:

install.packages(pkgs = "https://cran.r-project.org/src/contrib/Archive/lsmeans/lsmeans_2.27-2.tar.gz",
                 lib = local_lib,
                 type = "source",
                 repos = NULL)

You can run into package dependencies issues, in which case pay attention to the error messages and install the needed dependencies. The order of installing dependencies matters.

About

Implementing a Generalized Linear Mixed Effects Model (GLMM) on a Before-After-Control-Impact (BACI) study design related to coastal dune restoration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages