250 likes | 392 Views
Simulation for Examining Margin of Error and Sample Size: Binomial Proportions. Acknowledgements to Mandy Kauffman (WEST, Inc.) for photos and ‘background’ slides…simulation exercise adapts pedagogy of Trumbo,Suess , and Okumura (2005). Background – Bovine brucellosis. Bacterial disease
E N D
Simulation for Examining Margin of Error and Sample Size: Binomial Proportions Acknowledgements to Mandy Kauffman (WEST, Inc.) for photos and ‘background’ slides…simulation exercise adapts pedagogy of Trumbo,Suess, and Okumura (2005)
Background – Bovine brucellosis • Bacterial disease • History in US • Elk, bison, cattle (humans) • Cattle wildlife • Causes abortions • Environmental contamination • Potential transmission to cattle • $$$$ • Management implications
Background - Elk Feedgrounds • Harsh winters + development elk starving, commingling with cattle • 23 supplemental winter elk feedgrounds created • 22 WGFD • 1 USFWS • Up 84% of elk use • feedgrounds • Low winter mortality • Costly • 22% seroprevalence on feedgrounds3.7% elsewhere Preble 1911
Background – Management • Management strategies • Maintain cattle/elk separation -hazing elk -fencing haystacks -elk feedgrounds 2. ↓ likelihood of exposed cattle experiencing abortions (RB51) • ↓ seroprevalence in elk -T&S -low density feeding -elk vaccination
Background: Management • Despite ongoing management: • Recent cases in cattle/bison traced back to elk • Affected area expanding • Limited $$ available for management • No clear scientifically sound method • Need for economic evaluation of available management strategies • Groups 1 & 2 already evaluated/underway • Evaluation of Group 3 strategies still needed • How to assess sero-prevalence of brucellosis in elk on feedgrounds…how many elk to sample?
A Beginning Let’s start with simulating brucellosis diagnosis from 25 randomly sampled elk…assume prevalence is 0.22…goal to estimate prevalence within 5%...how many elk needed? Issue with the assumption of random here? R Code: samp <- sample(0:1,25,rep=T,prob=c(0.78,0.22)) samp
Generate a Profile Let’s observe the incidence rate for a variety of sample sizes...keep in mind that this profile doesn’t display independent samples R Code: n <- 25 NumElk <- 1:n p.bruc <- c(0.78,0.22) x <- sample(0:1,n,rep=T,prob=p.bruc) run.tot.pos <- cumsum(x) Proportion <- run.tot.pos/NumElk tabresults <- round(cbind(NumElk,x,run.tot.pos,Proportion),3) tabresults
Generating a Profile R Code: plot(NumElk,Proportion,type="l", ylim= c(0,1)) abline(h=0.22,col="green",lwd=2) abline(h=0.17,col="blue",lwd=2,lty=3) abline(h=0.27,col="blue",lwd=2,lty=3) Running the simulation and corresponding plots several times will provide differing versions of the profile on the next page… variation in profiles displays the instability in our statistic
Generating Multiple Profiles R Code: set.seed(11);n <- 25; numsamps <- 20 plot(0,pch=" ", xlim=c(0,n), ylim = c(0.1,1.0), xlab = "NumElk", ylab="Proportion") #Loop below will produce a different profile for each of the specified #numsamps… for(i in 1:numsamps){ x <- cumsum(sample(0:1,n,rep=T,prob=p.bruc)) / (1:n) lines(1:n,x) } abline(h=0.22,col="green",lwd=2) abline(h=0.17,col="blue",lwd=2,lty=3) abline(h=0.27,col="blue",lwd=2,lty=3)
Simulation for Determining Power • Power is a concept that is often difficult to teach, regardless of the level of the course…probably because hypothesis testing is such a strange beast! • Many practical applications involve evaluating sampling protocols in terms of the ability to detect change over a period of time • Simulation often quite effective for determining power associated with a particular design
Monitoring Woody Vegetation in Cobble Bars • Cobble bars are an important feature for many streams…home of native and non-native plants and many species of birds nest in these regions What is the proportion of ‘woody vegetation’ cover on cobblebars in the Great Smokey Mountains?
22 cobble bars exist in the BISO area…can afford to sample 9 of them-GRTS selection of sampling units- rotating panel monitoring schedule
transect Point intercept counts on transect
The code to the left computes as we change the effect size (i.e. the per annum change)
Just as we would expect, the power increases with larger trends