Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercise 1: Example of latent variable - occupancy inference The Hobbiton council has recently expanded the hobbit-lands further west. However, it turned.

Similar presentations


Presentation on theme: "Exercise 1: Example of latent variable - occupancy inference The Hobbiton council has recently expanded the hobbit-lands further west. However, it turned."— Presentation transcript:

1 Exercise 1: Example of latent variable - occupancy inference The Hobbiton council has recently expanded the hobbit-lands further west. However, it turned out the land is infested with dragons. Of the 10kmx10km areas studied so far, 70% of them contained dragons. A standardized procedure for doing transects was developed so that each transect has the same detection probability, given occupancy. The Hobbiton biology department has found that the detection probability for dragon-infested areas is about 50% per transect. With no dragon, there is of course, no detection. ? Here be dragons No dragons ? Dragon Hobbit

2 Exercise 1: Dragon occupancy What’s the (marginal) probability that you’ll detect a dragon on any one transect? Show, using Bayes theorem, that the probability for having a dragon in the area given detection is 100%. Find the probability for there being a dragon in the area (occupancy) given that you didn’t detect anything. Could you expect this probability to drop from it’s previous value, even without knowing the specific occupancy rate and detection rate? Occupied Detection (and occupied) Occupied Detection (and occupied) Occupied or Model: Dragon occupancy (L)  Dragon detection (D) Since field biologists are getting scarce, the council has now reduced the number of transects to one per area.

3 Exercise 1: Extra Since Hobbiton field biologists are now getting *really* scarce, the transect procedure has been changed. You are now no longer require to poke the dragon with a stick before confirming detection. Visual detection from afar is now allowed. It is assumed this doesn’t change the detection rate given occupancy. As all biologists know, dragons and wyverns can be confused with each other when seen afar. It’s assumed this means the false positive rate (the probability of detection given no dragon occupancy) is 2%. What’s the overall detection rate now? Also, what’s the probability of occupancy given detection and given no detection now? Dragon Wyvern

4 Exercise 2: Salamander data using binomial model Detection data from a salamander species will be examined using a purely binomial model and using the occupancy model. There are A=39 areas. R-code for data can be found describing the data plus some likelihood-code: http://folk.uio.no/trondr/finse/salamanders_ml.R or http://folk.uio.no/trondr/finse/full/salamanders_ml.R http://folk.uio.no/trondr/finse/salamanders_ml.R http://folk.uio.no/trondr/finse/full/salamanders_ml.R Study the data using the binomial model (the issue of occupancy is ignored). a)Study the histogram of detection counts, k i. Are there signs of zero-inflation? b)Plot the likelihood function or it’s logarithm in it’s ordered form and try to do ML estimation graphically. c)Do the same for the unordered form (with the binomial coefficient). Discuss the differences and sameness of these plots. Will be inference be different? d)The ML estimate for p is k/n, where k=  k i, n=  n i. What’s the log-likelihood?

5 Exercise 3: Salamander data using occupancy Study the data using the occupancy model. a)Fetch the code for the likelihood (ordered version) at http://folk.uio.no/trondr/finse/salamanders_ml.R or write it yourself. http://folk.uio.no/trondr/finse/salamanders_ml.R b)Plot the likelihood surface ( the function now has two inputs,  and p ). You can use “contour” in R. Estimate the parameters graphically. c)Use numeric optimization to calculate the ML estimates for  and p. d)Find the likelihood value for these estimates. e)Use the likelihood ratio-test to test whether we need to reject the binomial model to the advantage of the occupancy model or not.

6 Exercise 4: Weta occupancy Weta is the name given to about 70 insect species endemic to New Zealand. Again, occupancy modelling is called for. You can use the WinBUGS-code for the salamander case to use as a template for these exercise. See http://folk.uio.no/trondr/finse/salamanders_binom.wb and http://folk.uio.no/trondr/finse/salamanders_occ.wb. The data can be found in a WinBUGS digestable format in http://folk.uio.no/trondr/finse/weta.wb. PS: The Weta data consists of detection counts rather than single detection indicators. You will thus have to change the likelihood-representation in the code (from Bernoulli on single detections to binomial for detection counts). a)Pre-exercise: Redo the analysis on the salamanders. b)Examine the data using the binomial model. Does the Markov chain seem to converge? Is it efficient? Look at the posterior distribution of the detection rate. Compare to the ML approach. c)Examine the data using the occupancy model. Again, comment on convergence and efficiency. Study the chains and the posterior distribution and compare to the ML approach. d)Extra: Redo the salamander data analysis and compare to the ML estimates in exercise 3.

7 Exercise 5: Weta occupancy with an explanation variable An expanded version with an explanation variable (goat browsing) is found here: http://folk.uio.no/trondr/finse/weta_browsed.wb. Fetch the data with the “browsed” explanation variable. a)Change the model specification in WinBUGS so that there different occupancy rates and detection rates for the browsed and the unbrowsed areas. b)Study the convergence and efficiency. c)Compare the posterior of  and p for browsed and unbrowsed areas. Could the model be simplified while still having some dependency on the explanation variable?

8 Exercise 6: Weta occupancy model testing A template file for model comparison can be found here: http://folk.uio.no/trondr/finse/salamanders_testbinom.wb. a)Do Bayesian model comparison on binomial vs occupancy (easy), occupancy with or without explanation variable (hard) or all models (very hard). b)Which model would you recommend? c)Extra: Do frequentist model comparison and compare.


Download ppt "Exercise 1: Example of latent variable - occupancy inference The Hobbiton council has recently expanded the hobbit-lands further west. However, it turned."

Similar presentations


Ads by Google