Introduction to Occupancy Models Key to in-class exercise are in blue

Slides:



Advertisements
Similar presentations
ANALYSIS OF VARIANCE (ONE WAY)
Advertisements

Hypothesis testing 5th - 9th December 2011, Rome.
Krishna Pacifici Department of Applied Ecology NCSU January 10, 2014.
 Statistics package  Graphics package  Programming language  Can be used to share/reproduce analyses  Many new packages being created - can be downloaded.
Detectability Lab. Outline I.Brief Discussion of Modeling, Sampling, and Inference II.Review and Discussion of Detection Probability and Point Count Methods.
Chapter 11 Contingency Table Analysis. Nonparametric Systems Another method of examining the relationship between independent (X) and dependant (Y) variables.
Maximum likelihood estimates What are they and why do we care? Relationship to AIC and other model selection criteria.
Species interaction models. Goal Determine whether a site is occupied by two different species and if they affect each others' detection and occupancy.
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
You would not go and count every single flower
E XCEL P ROJECT T UTORIAL. G ETTING YOUR UNIQUE DATA SET … Go to the stat 216 homepage: and.
Week 14 Chapter 16 – Partial Correlation and Multiple Regression and Correlation.
Relationships Among Variables
SW388R7 Data Analysis & Computers II Slide 1 Analyzing Missing Data Introduction Problems Using Scripts.
SW388R6 Data Analysis and Computers I Slide 1 Chi-square Test of Goodness-of-Fit Key Points for the Statistical Test Sample Homework Problem Solving the.
1 Psych 5500/6500 Statistics and Parameters Fall, 2008.
LEARNING PROGRAMME Hypothesis testing Intermediate Training in Quantitative Analysis Bangkok November 2007.
UNLOCKING THE SECRETS HIDDEN IN YOUR DATA PART 1 Data and Data Analysis.
1 Chapter 1: Introduction to Design of Experiments 1.1 Review of Basic Statistical Concepts (Optional) 1.2 Introduction to Experimental Design 1.3 Completely.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
FW364 Ecological Problem Solving Lab 4: Blue Whale Population Variation [Ramas Lab]
PMS /134/182 HEX 0886B6 PMS /39/80 HEX 5E2750 PMS /168/180 HEX 00A8B4 PMS /190/40 HEX 66CC33 By Adrian Gardener Date 9 July 2012.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
ESTIMATES AND SAMPLE SIZES
Independent Samples t-Test (or 2-Sample t-Test)
Detecting trends in dragonfly data - Difficulties and opportunities - Arco van Strien Statistics Netherlands (CBS) Introduction.
Using historic data sources to calibrate and validate models of species’ range dynamics Giovanni Rapacciuolo University of California Berkeley
7 - 1 Chapter 7: Data Analysis for Modeling PowerPoint Slides Prepared By: Alan Olinsky Bryant University Management Science: The Art of Modeling with.
Resource Selection Functions and Patch Occupancy Models: Similarities and Differences Lyman L. McDonald Senior Biometrician Western EcoSystems Technology,
Populations & Sampling. Population The number of species living in a particular place and a particular time Population ecology looks at knowing the dynamics.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Hypothesis testing Intermediate Food Security Analysis Training Rome, July 2010.
Page 1 Non-Payroll Cost Transfer Enhancements Last update January 24, 2008 What are the some of the new enhancements of the Non-Payroll Cost Transfer?
INTRODUCTION TO ANALYSIS OF VARIANCE (ANOVA). COURSE CONTENT WHAT IS ANOVA DIFFERENT TYPES OF ANOVA ANOVA THEORY WORKED EXAMPLE IN EXCEL –GENERATING THE.
PCB 3043L - General Ecology Data Analysis. OUTLINE Organizing an ecological study Basic sampling terminology Statistical analysis of data –Why use statistics?
Multiple alignment: Feng- Doolittle algorithm. Why multiple alignments? Alignment of more than two sequences Usually gives better information about conserved.
1 Chapter 1: Introduction to Design of Experiments 1.1 Review of Basic Statistical Concepts (Optional) 1.2 Introduction to Experimental Design 1.3 Completely.
MK346 – Undergraduate Dissertation Preparation Part II - Data Analysis and Significance Testing.
A Simple Guide to Using SPSS ( Statistical Package for the Social Sciences) for Windows.
SP5 - Neuroinformatics SynapsesSA Tutorial Computational Intelligence Group Technical University of Madrid.

Introduction to R Introductions What is R? RStudio Layout Summary Statistics Your First R Graph 17 September 2014 Sherubtse Training.
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
PCB 3043L - General Ecology Data Analysis.
Introduction to Models Lecture 8 February 22, 2005.
Workshop on Applied Hierarchical Modeling in BUGS and unmarked Patuxent Wildlife Research Center November 2015.
Estimation of Animal Abundance and Density Miscellaneous Observation- Based Estimation Methods 5.2.
Statistical Methods. 2 Concepts and Notations Sample unit – the basic landscape unit at which we wish to establish the presence/absence of the species.
Capture-recapture Models for Open Populations “Single-age Models” 6.13 UF-2015.
 1 Species Richness 5.19 UF Community-level Studies Many community-level studies collect occupancy-type data (species lists). Imperfect detection.
Unit 3 Investigative Biology. SQA Success Criteria  Explain the difference between random sampling, systematic sampling and stratified sampling.
Monitoring and Estimating Species Richness Paul F. Doherty, Jr. Fishery and Wildlife Biology Department Colorado State University Fort Collins, CO.
Single Season Model Part I. 2 Basic Field Situation From a population of S sampling units, s are selected and surveyed for the species. Units are closed.
The inference and accuracy We learned how to estimate the probability that the percentage of some subjects in the sample would be in a given interval by.
1 Occupancy models extension: Species Co-occurrence.
 1 Modelling Occurrence of Multiple Species. 2 Motivation Often there may be a desire to model multiple species simultaneously.  Sparse data.  Compare/contrast.
 Multi-state Occupancy. Multiple Occupancy States Rather than just presence/absence of the species at a sampling unit, ‘occupancy’ could be categorized.
Multiple Season Study Design. 2 Recap All of the issues discussed with respect to single season designs are still pertinent.  why, what and how  how.
Single Season Study Design. 2 Points for consideration Don’t forget; why, what and how. A well designed study will:  highlight gaps in current knowledge.
 Occupancy Model Extensions. Number of Patches or Sample Units Unknown, Single Season So far have assumed the number of sampling units in the population.
Multi-state Occupancy. Multiple Occupancy States Rather than just presence/absence of the species at a sampling unit, ‘occupancy’ could be categorized.
Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with Stata – Estimation –
PCB 3043L - General Ecology Data Analysis Organizing an ecological study What is the aim of the study? What is the main question being asked? What are.
Chloe Boynton & Kristen Walters February 22, 2017
Quadrat Sampling Chi-squared Test
Lecture Slides Elementary Statistics Twelfth Edition
PCB 3043L - General Ecology Data Analysis.
Week 14 Chapter 16 – Partial Correlation and Multiple Regression and Correlation.
Code is on the Website Outline Comparison of Excel and R
Estimating mean abundance from repeated presence-absence surveys
Presentation transcript:

Introduction to Occupancy Models Key to in-class exercise are in blue Jan 8, 2016 AEC 501 Nathan J. Hostetter njhostet@ncsu.edu

Occupancy Abundance often most interesting variable when analyzing a population Occupancy – probability that a site is occupied Probability abundance is >0

Detection/non-detection data Presence data rise from a two part process The species occurs in the region of interest AND The species is discovered by an investigator What do absence data tell us? The species does not occur at that particular site OR The species was not detected by the investigator

Occupancy studies Introduced by MacKenzie et al. 2002 and Tyre et al. 2003 Allows for collection of data that is less intensive than those based on abundance estimation Use a designed survey method like we discussed before – simple random, stratified random, systematic, or double Multiple site visits are required to estimate detection and probability of occurrence

Why occupancy? Data to estimate abundance can be difficult to collect, require more time and effort, might be more limited in spatial/temporal scope Obtaining presence/absence data is Usually less intensive Cheaper Can cover a larger area or time frame Might be more practical for certain objectives

Why occupancy? Some common reasons and objectives Extensive monitoring programs Distribution (e.g., ranges shifts, invasive species, etc.) Habitat selection Meta-population dynamics Species interactions Species richness

Occupancy studies Key design issues: Replication Temporal replication: repeat visits to sample units Spatial replication: randomly selected ‘sites’ or sample units within area of interest

Model parameters Replication allows us to separate state and observation processes 𝜓 𝑖 -probability site i is occupied. pij -probability of detecting the species in site i at time j, given species is present.

Blue grosbeak example Associated with shrub and field habitats, medium sized trees, and edges Voluntary program to restore high-quality early successional habitat in Southern Georgia (BQI – bobwhite quail initiative) Are grosbeaks more likely to use fields enrolled in BQI program?

Blue grosbeak example N = 41 sites (spatial replication) K = 3 sample occasions (temporal replication) Example data: Site S1 S2 S3 1 2 3 … 41

Model assumptions Sites are closed to changes in occupancy state between sampling occasions Duration between surveys The detection process is independent at each site Distance between sites Probability of detection is constant across sites and visits or explained by covariates Probability of occupancy is constant across sites or explained by covariates

Enough talk, Let’s work through the blue grosbeak example

Introduction to R Basics and Occupancy modeling

Intro to R: Submitting commands Commands can be entered one at a time 2+2 [1] 4 2^4 [1] 16

The R environment Script file (File|New script) R Console Text file Save for later use Submit command by highlighting command at pressing “Crtl R” R Console Where commands are executed

R console: Interactive calculations #Try the following in the script file: 2+2 a <- 2 + 2 #create the object a a #returns object a A #Nope, case sensitive b<-2*3 b a+b #Use the +, -, *, /, and ^ symbols # Use “#” to enter comments

Built in functions x1 <- c(1,3,5,7) #vector x1 mean(x1) [1] 4 sd(x1) [1] 2.581989 #Help files ?mean

Loading and storing data sets Comma separated variable (CSV) Create a CSV file in excel by clicking “save as” and scrolling to “.csv”. CSV files can be opened in excel, but also in any other text editor. Say “C:\Documents\data.csv” is an .csv file. To load a csv file: dat <- read.csv(“C:\\Documents\\data.csv",header=TRUE) dat ?read.csv #for further help

Saving work Save your current session in an R workspace as save.image(“C:\\Documents\\whatever.RData") Load a previously saved workspace File|Load workspace Save script file Click on script file File|Save Check out Brian Reich’s intro to R at http://www4.stat.ncsu.edu/~reich/ST590/code/Data

Intro to Occupancy analysis in R Blue grosbeak example Associated with shrub and field habitats, medium sized trees, and edges Voluntary program to restore high-quality early successional habitat in Southern Georgia (BQI – bobwhite quail initiative) Are grosbeaks more likely to use fields enrolled in BQI program?

Intro to Occupancy analysis in R Blue grosbeak example 41 fields were surveyed Each field visited on 3 occasions during the 2001 breeding season A 500 m transect was surveyed on each field Data on detection/non-detection

Load data Download and save the blgr.csv file from https://www.cals.ncsu.edu/course/zo501/ Use “save link as…” Open the file and make sure you understand the data Load blgr.csv (see example on slide 18) blgr<- read.csv("C:\\My Documents\\blgr.csv", header=TRUE) head(blgr) #first 5 rows #y.1, y.2, y.3 are detection/non-detection surveys dim(blgr) #dimensions of the data (how many sites?) 41 sites; there are 41 rows and each row is a site colSums(blgr) #sums the columns #how many fields were enrolled in bqi? 14 #how many fields had blgr detections in during first survey? 18 #what is the naïve occupancy if only the first survey was conducted? 18/41 = 0.44

Covariates Site level covariates Observation level covariates Data that is site specific but does not change with repeated visits e.g., forest cover, percent urban, tree height, on/off road, etc. Observation level covariates Data that is collected specific to the sample occasion and site e.g., time of day, day of year, wind, etc. What type of covariate is bqi? bqi is a site level covariate. bqi varies by site, but does not change during repeated visits.

Occupancy analysis – Unmarked R package Fits models of animal abundance and occurrence Complete description of unmarked at https://cran.r-project.org/web/packages/unmarked/unmarked.pdf

Install Unmarked install.packages("unmarked") #Only required first time to install library(unmarked) #loads package, required each time

Format data for occupancy analysis in unmarked Square brackets can be used to select columns You need to create a file of the observations ydat <- blgr[,1:3] #select columns 1 through 3, detection data Covariates can be separated here or in the unmarkedFrameOccu later bqi <- blgr[,4] #select column 4, bqi enrollment #use built in function to format data umf <- unmarkedFrameOccu(y=ydat, #Observation data must be named ‘y’ siteCovs=data.frame(bqi=bqi)) #name site covariate bqi umf

Occupancy in unmarked #run occupancy model with no covariates # occu(~detection ~occupancy) # ~1 means constant. Here Detection and Occupancy are constant fm1 <- occu(~ 1 ~ 1, umf ) fm1 #look at the output #Get the estimates for detection 0.551 backTransform(fm1['det']) #Get the estimates for occupancy 0.885 #remember, occupancy is our ‘state variable’ backTransform(fm1['state']) #higher or lower than naïve occupancy? Why? The occupancy probability (0.885) is higher than naïve occupancy (0.44) because it accounts for imperfect detection (i.e., detection probability is <1.0).

Occupancy in unmarked - Covariates #effect of bqi # occu(~detection ~occupancy) fm2 <- occu(~ 1 ~ bqi, umf ) #Detection is constant and occupancy varies by bqi fm2 #look at the output #interpret bqi parameter – BQI was associated with a decrease in occupancy probability (estimate = -1.39), but it was not significant (p = 0.3690) #Get the estimates for detection 0.551 backTransform(fm2['det']) #Get the estimates for occupancy backTransform(fm2['state']) #Nope, backTransform is a bit more complicated when covariates are used. #see ?backTransform for options if interested

Occupancy in unmarked – Model comparison #Compare model support using AIC fitlist<-fitList(fm1, fm2) modSel(fitlist) # I added the Occupancy and Detection columns ‘unmarked’ has a built in function to compare models using AIC. Here is a summary of the default table: “nPars” – Number of parameters in the model “AIC” – Models with lower AIC have more support. “delta” – the AIC difference between each model and the top model. AICwt – “Model weight” - the probability that the model is the top model cumltvWt – cumulative model weights. Occupancy Detection Name nPars AIC delta AICwt cumltvWt ~1 fm1 2 172.19 0.00 0.61 BQI fm2 3 173.12 0.93 0.39 1.00

Summary Occupancy (presence/absence) Usually less intensive to collect Often less expensive Can cover a larger area or time frame Several important fields in ecology focus on occupancy Might be more practical for monitoring True census is often (always) impossible Must account for detection probability Requires clear objectives Quantity to be estimated Temporal and spatial scope Precision Practical constraints

EXTRA – Format observation covariates in unmarked This is a general approach for formatting detections, site covariates, and observation covariates. #the file is named data #observations are ydat #habitat is a site level covariate in a column named ‘habitat’ #date is an observation level covariate, it was recorded during each survey #date columns are named: date.1, date.2, date.3 #use unmarkedFrameOccu () to format data umf <- unmarkedFrameOccu(y=ydat, #Observation data must be named ‘y’ siteCovs=data.frame(habitat=data$habitat), #name site covariate habitat obsCovs=list(date=data[,c("date.1", "date.2", "date.3")])) #name date covariate date