###################### # Additive mortality # ###################### h=seq(0,1,.05) s0=0.6 Sa=s0*(1-h) plot(h,Sa,lty=1,type='l',col='red',ylim=c(0,1),xlim=c(0,1), ylab='Survival Rate') ########################## # Compensatory mortality # ########################## ### C=1-s0 ### # Set C to be (1-s0) C=1-s0 # Conditional survival rate based on whether # harvest rate (h) is greater than C or not Sc=ifelse (h > C, ((1-h)/(1-C))*s0, s0+0*h) # Plot compensatory model points(h,Sc,lty=2,type='l',col='red') abline(v=C,lty=3,col='red') ### C < 1-s0 ### # Set C to be lower than (1-s0) C=1-s0-(0.5*(1-s0)) # Conditional survival rate based on whether # harvest rate (h) is greater than C or not Sc=ifelse (h > C, ((1-h)/(1-C))*s0, s0+0*h) # Plot compensatory model points(h,Sc,lty=2,type='l',col='green') abline(v=C,lty=3,col='green')