Background:

Although we expect that populations can produce more offspring than needed for replacement, they cannot grow exponentially for long. A typical population trajectory through time is “S” shaped (also called a “sigmoid curve”), with growth in percent per year slowing as the population reaches a “carrying capacity” (K). The most common equation to represent this pattern is the logistic equation:

dN/dt (change in N with change in time) = rN (1 - N/K)

The discrete form of this equation is: N(t + 1) = N(t) + r * N(t) * (1 - N(t)/K)

The logistic equation (and minor modifications of it) is used regularly in harvest management. The equation predicts that the largest number of individuals will be added to the population in the next year when the population size is 1/2 of K. Note that this is different from proportional population growth rate - the number added (production) is N (t+1) - N(t).

Importantly, for these models, r is considered an “intrinsic property” of the population, rather than a result like lambda. r itself does not change, and is the maximum rate of growth that the population can reach. r is a continuous rate often called “r max”. The logistic model equation assumes that a population will grow at a rate of “r” when it is at its lowest density because animals are not competing for resources (but see lecture notes on depensation to see why this may sometimes be a bad assumption). As soon as the population starts to increase, the “realized” growth rate (which we can express as lambda, N(t+1)/N(t)) will be less than exp^r due to density dependence caused by intraspecific competition. You can see how this works by writing out the equation on a piece of paper, choosing an r and a K value, and calculating N(t+1) when N(t) = 1, 2, 10, one half of K, K-1, K, and K+10. This is a good exercise to help understand how the equation actually works.

Exercise 1. Logistic equation. Start at an initial population size and project a population through time using parameter values for r and K. To find N(t + 1), use the discrete form of the logistic equation (15 points total):

N(t + 1) = N(t) + r * N(t)*(1 - N(t)/K)

We need to set our r, K and N0 values with the following code:

#maximum intrinsic growth rate
    r <- 0.3

# carrying capacity
    K <- 500
    
# initial population size
    N0 <- 5

We can now fill in the values of our N column using for-loops (we learned about these during our extinction analysis) and the logistic equation given above. We first have to create a vector to store the values of N and then set our N value at time 0 to the N0 value we established initially using bracket notation

A. Plot N(t) through time (3 points)

numyears <- 50
N <- rep(NA, numyears) #makes an empty vector (NA) with length numyears. This is an easy way to make an object to fill
N[1] <- N0 #initialize the vector for the first year
for(t in 1:(numyears-1)){  #Note the indexing from 1 to (numyears-1) so that the last element in the vector is N[numyears] and not N[numyears+1], which is bigger than the vector we made
  #N[t+1] <- #Use the appropriate equation
  
}
numyears<-50 
N<-rep(NA, numyears)
N[1]<-N0 
for(t in 1:(numyears-1)){N[t+1]<-N[t] + r*N[t]*(1- N[t]/K)
}

plot(N, xlab ="Years",ylab ="Initial Population",main ="Initial Population through Time",pch =20)

B. Plot N(t+1) vs. N(t) (3 points)

Use appropriate indexing to plot an x-axis with N(t) and y-axis with N(t+1). This graph shows an approach toward equilibrium, which occurs when N(t) = N(t+1). This will not look that interesting for the value of r that we have chosen, but if you increase r to 3 or more, the dynamics get very interesting and there is no equilibirium but rather the population enters cycles or chaos. For our purposes, this exercise is a stepping stone to get to part C. I want you to see how to access elements 2 through 50 on the y-axis, N(t+1) and 1 through 49 on the x axis, N(t), which is necessary to make the plot.

plot(N[1:49], N[2:50],
     main ="N(t+1) vs N(t)",
     xlab ="N(t+1)",
     ylab ="N(t)",
     pch = 20)

C. Plot an approximation of dN/dt vs N (3 points)

You need to plot the change in N divided by the change in t. To do this, make a vector of (N(t+1) - N(t)), which is the change in N from one year to the next. dt = 1, so this column is your dN/dt (dividing by 1 gives you the same number back). Plot N(t) (x-axis) vs change in N (y-axis),

dN<-(N[2:50]-N[1:49])
dN <- rep ( NA , numyears )
for ( t in 1 : ( numyears - 1 ) )
{ dN[t+ 1 ] <- N [t+ 1 ] - N [t ] 
}
plot ( N , dN, 
       main = " Approximation of dN / dt vs N ", 
       xlab = " Population " , 
       ylab = " Change in Population " , 
       pch = 19 )

D. PLOT N(t) vs. lambda (3 points)

You will have to find lambda for every time step

lam<-rep(NA, numyears)
for(t in 1:(numyears-1)){
  lam[t+1]<-N[t+1] / N[t]
}
plot(N, lam,
     main ="N(t) vs Lambda",
     xlab ="Population",
     ylab ="Lambda",
     pch =19)

E. At what population size do you see maximum growth? (1 point)

##N=K/2 ##N=500/2 ##250

F. What could your maximum sustainable harvest rate per year be if r = 0.6 and K = 500? (This is what we call Maximum Sustainable Yield) Hint: It’s whatever the maximum production is because you can harvest that production without changing the population, which is how “sustainable” is defined - it can be sustained. (2 points)

r<-0.6
K<-500
MSY<-(r*K)/4
MSY
## [1] 75

Exercise 2. California Condor population dynamics. (3 points total)

Six condor breeding pairs (12 condors) are re-introduced into Pinnacles National Park from a captive breeding program. The suitable habitat is relatively small and biologists estimate it can only support about 250 condors (its carrying capacity). The condor population initially grows with an maximum intrinsic growth rate of r = 0.08.

A. What is the maximum possible growth rate for the population (in terms of change in # of condors year, dN/dt)? (3 points)

Hint: You need to find the dN/dt for this population when it is at half of its carrying capacity, following the logistic growth equation, dN/dt - rN(1-(N/K)).

r<-.08
K<-250/2
N<- 12
dN_dt <- r*N*( 1 -( N/K ) )
dN_dt
## [1] 0.86784

Exercise 3. Maximum sustained yield of Lake Trout under logistic population growth. (8 points total)

A fisheries biologist wants to maximize the yield to a fishery for lake trout by maintaining a population of lake trout at ~11,500 individuals. Another biologist wants to increase yield by stocking more fish into the lake. The first fish biologist disagrees saying that she is maintaining maximum sustained yield (MSY), and stocking will not increase the rate of fish produced (i.e. overstocking could decrease sustained yield).

A. If the biologist thinks MSY will be produced at 11,500 individuals, what is the assumed carrying capacity of the lake? (2 point)

##K=11500*2 ##K=23000

B. Assume that the population growth rate r for trout is 0.11. Find the population growth rate (dN/dt), which is approximated by N(t+1) - N(t) at the population size that yields MSY. (3 points)

r<-0.11
N<-11500
K<-23000
dNdt<-r*N*(1-N/K)
dNdt
## [1] 632.5

C. Find the population growth rate dN/dt if the second biologist stocks the lake to a total of 14,000 trout assuming that the first fish biologist was correct about the carrying capacity of the lake. How much more or less is the sustainable yield when the population is held at 14,000 trout? (3 points)

r<-0.11
N<-14000
K<-23000
dNdt<-r*N*(1-N/K)
dNdt
## [1] 602.6087

Exercise 4. Recruitment of game birds. (9 points total)

Imagine that in 2016, you were appointed to run a wildlife management area in Southwestern Oregon At this same time, an upland game bird stocking program transplanted 8 wild turkeys and 14 ruffed grouse into your area. You are in charge of determining the management target population sizes, with the intention of maximizing yield in the long term, as well as the sustainable harvest targets. A graduate student at OSU has recently determined that wild turkey population growth on your management area closely follows a Ricker curve. She estimates \(\alpha\) is 7 and \(\beta\) is 0.003448. She also estimated that the grouse have Beverton-Holt recruitment dynamics. In this case, \(\alpha\) is 0.0012 and \(\beta\) is 0.35 using the form of Beverton-Holt from the PPT not the form used in the video.

A. Produce a plot of adult population size vs. expected recruitment for each species (turkeys follow Ricker dynamics and grouse follow Beverton Holt). The adult popualtion size should range from 1:800. Add the 1:1 replacement line to your plot (i.e when y=x, the abline() function is the easiest way to do this). Label both axes. (4 points)

##The Ricker function: Recruits  = alpha*N*exp(-beta*N)

##The Beverton-Holt function has various equivalent forms. 
##In this problem use Recruits = 1/(alpha + beta/N)

a<-7
b<-0.003448
x<-1:800
turkey<-a*x*exp(-b*x)
turkey
##   [1]   6.975906  13.903788  20.783896  27.616475  34.401772  41.140030
##   [7]  47.831494  54.476406  61.075007  67.627536  74.134234  80.595337
##  [13]  87.011083  93.381708  99.707445 105.988529 112.225192 118.417665
##  [19] 124.566178 130.670962 136.732244 142.750250 148.725208 154.657343
##  [25] 160.546878 166.394036 172.199040 177.962109 183.683465 189.363326
##  [31] 195.001910 200.599434 206.156113 211.672162 217.147796 222.583227
##  [37] 227.978668 233.334328 238.650418 243.927147 249.164723 254.363353
##  [43] 259.523242 264.644597 269.727621 274.772517 279.779488 284.748735
##  [49] 289.680458 294.574857 299.432130 304.252475 309.036089 313.783167
##  [55] 318.493904 323.168494 327.807130 332.410004 336.977308 341.509232
##  [61] 346.005964 350.467695 354.894611 359.286900 363.644746 367.968336
##  [67] 372.257853 376.513482 380.735403 384.923799 389.078851 393.200739
##  [73] 397.289641 401.345737 405.369202 409.360215 413.318950 417.245583
##  [79] 421.140287 425.003236 428.834603 432.634559 436.403274 440.140920
##  [85] 443.847664 447.523677 451.169124 454.784174 458.368992 461.923743
##  [91] 465.448592 468.943704 472.409239 475.845362 479.252233 482.630013
##  [97] 485.978861 489.298938 492.590401 495.853408 499.088116 502.294681
## [103] 505.473259 508.624004 511.747070 514.842610 517.910778 520.951723
## [109] 523.965599 526.952554 529.912739 532.846303 535.753393 538.634158
## [115] 541.488743 544.317295 547.119960 549.896882 552.648205 555.374073
## [121] 558.074628 560.750011 563.400366 566.025831 568.626547 571.202653
## [127] 573.754288 576.281590 578.784696 581.263742 583.718866 586.150201
## [133] 588.557882 590.942044 593.302821 595.640344 597.954746 600.246158
## [139] 602.514711 604.760536 606.983762 609.184518 611.362932 613.519132
## [145] 615.653245 617.765398 619.855717 621.924326 623.971351 625.996915
## [151] 628.001143 629.984156 631.946078 633.887029 635.807132 637.706506
## [157] 639.585272 641.443549 643.281456 645.099110 646.896630 648.674133
## [163] 650.431735 652.169552 653.887699 655.586292 657.265444 658.925270
## [169] 660.565882 662.187392 663.789914 665.373559 666.938437 668.484659
## [175] 670.012335 671.521574 673.012486 674.485177 675.939757 677.376332
## [181] 678.795009 680.195894 681.579093 682.944711 684.292853 685.623623
## [187] 686.937124 688.233460 689.512733 690.775045 692.020498 693.249193
## [193] 694.461231 695.656712 696.835734 697.998398 699.144803 700.275045
## [199] 701.389224 702.487435 703.569777 704.636345 705.687234 706.722541
## [205] 707.742359 708.746784 709.735909 710.709828 711.668634 712.612418
## [211] 713.541274 714.455293 715.354565 716.239182 717.109234 717.964810
## [217] 718.806000 719.632894 720.445578 721.244142 722.028672 722.799257
## [223] 723.555983 724.298935 725.028200 725.743864 726.446011 727.134726
## [229] 727.810093 728.472195 729.121117 729.756941 730.379749 730.989623
## [235] 731.586646 732.170898 732.742460 733.301414 733.847837 734.381811
## [241] 734.903415 735.412727 735.909826 736.394790 736.867696 737.328623
## [247] 737.777645 738.214841 738.640287 739.054057 739.456227 739.846873
## [253] 740.226069 740.593888 740.950406 741.295694 741.629828 741.952878
## [259] 742.264917 742.566018 742.856252 743.135690 743.404403 743.662462
## [265] 743.909937 744.146897 744.373413 744.589552 744.795384 744.990978
## [271] 745.176401 745.351721 745.517005 745.672321 745.817735 745.953313
## [277] 746.079121 746.195226 746.301692 746.398584 746.485967 746.563905
## [283] 746.632463 746.691704 746.741690 746.782486 746.814154 746.836757
## [289] 746.850355 746.855012 746.850788 746.837744 746.815942 746.785441
## [295] 746.746302 746.698585 746.642349 746.577654 746.504558 746.423119
## [301] 746.333397 746.235450 746.129334 746.015107 745.892826 745.762549
## [307] 745.624332 745.478230 745.324300 745.162598 744.993178 744.816096
## [313] 744.631407 744.439164 744.239423 744.032237 743.817659 743.595744
## [319] 743.366543 743.130111 742.886499 742.635759 742.377944 742.113106
## [325] 741.841294 741.562562 741.276959 740.984537 740.685345 740.379434
## [331] 740.066853 739.747653 739.421881 739.089588 738.750822 738.405631
## [337] 738.054064 737.696169 737.331993 736.961584 736.584990 736.202257
## [343] 735.813431 735.418560 735.017689 734.610865 734.198134 733.779540
## [349] 733.355129 732.924946 732.489036 732.047443 731.600212 731.147386
## [355] 730.689010 730.225127 729.755780 729.281013 728.800868 728.315389
## [361] 727.824616 727.328593 726.827362 726.320964 725.809441 725.292834
## [367] 724.771184 724.244532 723.712919 723.176385 722.634970 722.088714
## [373] 721.537656 720.981838 720.421297 719.856072 719.286204 718.711729
## [379] 718.132688 717.549118 716.961056 716.368542 715.771612 715.170304
## [385] 714.564655 713.954703 713.340483 712.722033 712.099389 711.472587
## [391] 710.841663 710.206653 709.567593 708.924518 708.277463 707.626463
## [397] 706.971554 706.312769 705.650143 704.983710 704.313505 703.639561
## [403] 702.961912 702.280591 701.595633 700.907069 700.214933 699.519257
## [409] 698.820075 698.117418 697.411318 696.701809 695.988921 695.272686
## [415] 694.553136 693.830302 693.104215 692.374907 691.642407 690.906747
## [421] 690.167956 689.426066 688.681106 687.933107 687.182097 686.428107
## [427] 685.671166 684.911303 684.148547 683.382928 682.614473 681.843212
## [433] 681.069173 680.292385 679.512874 678.730670 677.945800 677.158292
## [439] 676.368173 675.575470 674.780211 673.982422 673.182131 672.379364
## [445] 671.574148 670.766509 669.956472 669.144065 668.329314 667.512243
## [451] 666.692879 665.871247 665.047372 664.221280 663.392996 662.562543
## [457] 661.729949 660.895235 660.058428 659.219552 658.378630 657.535687
## [463] 656.690747 655.843833 654.994969 654.144178 653.291484 652.436910
## [469] 651.580479 650.722213 649.862137 649.000271 648.136639 647.271264
## [475] 646.404167 645.535370 644.664896 643.792765 642.919001 642.043625
## [481] 641.166657 640.288120 639.408035 638.526422 637.643302 636.758697
## [487] 635.872628 634.985113 634.096175 633.205833 632.314108 631.421019
## [493] 630.526587 629.630832 628.733772 627.835429 626.935820 626.034966
## [499] 625.132886 624.229599 623.325123 622.419479 621.512684 620.604757
## [505] 619.695717 618.785582 617.874370 616.962101 616.048790 615.134458
## [511] 614.219121 613.302798 612.385505 611.467261 610.548083 609.627987
## [517] 608.706993 607.785116 606.862373 605.938782 605.014359 604.089120
## [523] 603.163083 602.236264 601.308679 600.380344 599.451276 598.521491
## [529] 597.591004 596.659832 595.727990 594.795494 593.862359 592.928601
## [535] 591.994235 591.059276 590.123740 589.187641 588.250996 587.313817
## [541] 586.376121 585.437921 584.499233 583.560071 582.620449 581.680382
## [547] 580.739883 579.798968 578.857649 577.915941 576.973858 576.031413
## [553] 575.088620 574.145493 573.202045 572.258289 571.314239 570.369908
## [559] 569.425309 568.480455 567.535359 566.590034 565.644493 564.698749
## [565] 563.752813 562.806698 561.860418 560.913984 559.967409 559.020704
## [571] 558.073882 557.126955 556.179935 555.232833 554.285662 553.338433
## [577] 552.391158 551.443849 550.496516 549.549171 548.601825 547.654491
## [583] 546.707178 545.759898 544.812662 543.865481 542.918366 541.971327
## [589] 541.024375 540.077521 539.130775 538.184148 537.237650 536.291292
## [595] 535.345083 534.399035 533.453156 532.507458 531.561950 530.616641
## [601] 529.671543 528.726664 527.782014 526.837603 525.893440 524.949536
## [607] 524.005898 523.062537 522.119462 521.176683 520.234207 519.292045
## [613] 518.350205 517.408696 516.467528 515.526708 514.586247 513.646151
## [619] 512.706431 511.767094 510.828149 509.889605 508.951470 508.013752
## [625] 507.076459 506.139600 505.203182 504.267215 503.331705 502.396661
## [631] 501.462090 500.528001 499.594401 498.661298 497.728699 496.796613
## [637] 495.865046 494.934006 494.003501 493.073537 492.144123 491.215265
## [643] 490.286970 489.359246 488.432100 487.505539 486.579570 485.654199
## [649] 484.729433 483.805280 482.881746 481.958837 481.036561 480.114924
## [655] 479.193932 478.273593 477.353911 476.434894 475.516548 474.598880
## [661] 473.681895 472.765600 471.850000 470.935103 470.020913 469.107437
## [667] 468.194681 467.282651 466.371352 465.460790 464.550971 463.641901
## [673] 462.733585 461.826029 460.919238 460.013219 459.107975 458.203513
## [679] 457.299838 456.396955 455.494870 454.593588 453.693114 452.793452
## [685] 451.894609 450.996589 450.099397 449.203038 448.307518 447.412839
## [691] 446.519009 445.626031 444.733910 443.842651 442.952258 442.062736
## [697] 441.174090 440.286324 439.399443 438.513450 437.628351 436.744149
## [703] 435.860850 434.978457 434.096974 433.216406 432.336757 431.458031
## [709] 430.580232 429.703364 428.827431 427.952437 427.078386 426.205281
## [715] 425.333128 424.461928 423.591687 422.722408 421.854095 420.986750
## [721] 420.120379 419.254984 418.390569 417.527137 416.664693 415.803238
## [727] 414.942778 414.083315 413.224852 412.367393 411.510941 410.655500
## [733] 409.801072 408.947660 408.095268 407.243900 406.393557 405.544243
## [739] 404.695960 403.848713 403.002504 402.157335 401.313210 400.470131
## [745] 399.628101 398.787123 397.947200 397.108335 396.270529 395.433786
## [751] 394.598109 393.763499 392.929960 392.097494 391.266103 390.435790
## [757] 389.606557 388.778407 387.951343 387.125365 386.300478 385.476682
## [763] 384.653981 383.832377 383.011871 382.192466 381.374164 380.556967
## [769] 379.740877 378.925897 378.112028 377.299273 376.487632 375.677109
## [775] 374.867706 374.059423 373.252263 372.446228 371.641320 370.837540
## [781] 370.034890 369.233372 368.432988 367.633739 366.835628 366.038655
## [787] 365.242822 364.448131 363.654583 362.862181 362.070925 361.280816
## [793] 360.491858 359.704050 358.917395 358.131893 357.347547 356.564356
## [799] 355.782324 355.001451
plot(x, turkey,
     main ="Adult Turkey Population Size vs Expected Recruitment",
     xlab ="Adult Turkey Population Size",
     ylab ="Recruits",
     pch =20)
abline(a=0,b=1,col ="red")

a2<-0.0012
b2<-0.35
x<-1:800
grouse<-1/(a2 + b2 / x)
grouse
##   [1]   2.847380   5.675369   8.484163  11.273957  14.044944  16.797312
##   [7]  19.531250  22.246941  24.944568  27.624309  30.286344  32.930845
##  [13]  35.557987  38.167939  40.760870  43.336945  45.896328  48.439182
##  [19]  50.965665  53.475936  55.970149  58.448459  60.911017  63.357973
##  [25]  65.789474  68.205666  70.606695  72.992701  75.363825  77.720207
##  [31]  80.061983  82.389289  84.702259  87.001024  89.285714  91.556460
##  [37]  93.813387  96.056623  98.286290 100.502513 102.705411 104.895105
##  [43] 107.071713 109.235353 111.386139 113.524186 115.649606 117.762512
##  [49] 119.863014 121.951220 124.027237 126.091174 128.143133 130.183221
##  [55] 132.211538 134.228188 136.233270 138.226883 140.209125 142.180095
##  [61] 144.139887 146.088596 148.026316 149.953140 151.869159 153.774464
##  [67] 155.669145 157.553290 159.426987 161.290323 163.143382 164.986251
##  [73] 166.819013 168.641750 170.454545 172.257480 174.050633 175.834085
##  [79] 177.607914 179.372197 181.127013 182.872435 184.608541 186.335404
##  [85] 188.053097 189.761695 191.461268 193.151888 194.833625 196.506550
##  [91] 198.170732 199.826238 201.473137 203.111495 204.741379 206.362855
##  [97] 207.975986 209.580838 211.177474 212.765957 214.346350 215.918713
## [103] 217.483108 219.039596 220.588235 222.129086 223.662207 225.187656
## [109] 226.705491 228.215768 229.718543 231.213873 232.701812 234.182416
## [115] 235.655738 237.121832 238.580750 240.032547 241.477273 242.914980
## [121] 244.345719 245.769541 247.186495 248.596632 250.000000 251.396648
## [127] 252.786624 254.169976 255.546751 256.916996 258.280757 259.638080
## [133] 260.989011 262.333594 263.671875 265.003897 266.329705 267.649341
## [139] 268.962848 270.270270 271.571649 272.867025 274.156442 275.439939
## [145] 276.717557 277.989337 279.255319 280.515542 281.770045 283.018868
## [151] 284.262048 285.499624 286.731634 287.958115 289.179104 290.394639
## [157] 291.604755 292.809489 294.008876 295.202952 296.391753 297.575312
## [163] 298.753666 299.926847 301.094891 302.257830 303.415698 304.568528
## [169] 305.716353 306.859206 307.997118 309.130122 310.258250 311.381532
## [175] 312.500000 313.613685 314.722617 315.826828 316.926346 318.021201
## [181] 319.111425 320.197044 321.278090 322.354590 323.426573 324.494068
## [187] 325.557103 326.615705 327.669903 328.719723 329.765193 330.806340
## [193] 331.843191 332.875772 333.904110 334.928230 335.948158 336.963921
## [199] 337.975543 338.983051 339.986468 340.985820 341.981132 342.972428
## [205] 343.959732 344.943068 345.922460 346.897932 347.869507 348.837209
## [211] 349.801061 350.761085 351.717305 352.669743 353.618421 354.563362
## [217] 355.504587 356.442119 357.375979 358.306189 359.232770 360.155743
## [223] 361.075130 361.990950 362.903226 363.811977 364.717224 365.618987
## [229] 366.517286 367.412141 368.303571 369.191598 370.076239 370.957514
## [235] 371.835443 372.710044 373.581337 374.449339 375.314070 376.175549
## [241] 377.033792 377.888819 378.740648 379.589297 380.434783 381.277123
## [247] 382.116337 382.952440 383.785450 384.615385 385.442260 386.266094
## [253] 387.086903 387.904704 388.719512 389.531345 390.340219 391.146149
## [259] 391.949153 392.749245 393.546441 394.340759 395.132212 395.920816
## [265] 396.706587 397.489540 398.269690 399.047052 399.821641 400.593472
## [271] 401.362559 402.128918 402.892562 403.653506 404.411765 405.167352
## [277] 405.920281 406.670568 407.418224 408.163265 408.905704 409.645555
## [283] 410.382831 411.117545 411.849711 412.579342 413.306452 414.031052
## [289] 414.753157 415.472779 416.189931 416.904626 417.616876 418.326693
## [295] 419.034091 419.739081 420.441676 421.141888 421.839729 422.535211
## [301] 423.228346 423.919147 424.607623 425.293788 425.977654 426.659230
## [307] 427.338530 428.015564 428.690344 429.362881 430.033186 430.701270
## [313] 431.367144 432.030820 432.692308 433.351618 434.008762 434.663751
## [319] 435.316594 435.967302 436.615887 437.262357 437.906725 438.548998
## [325] 439.189189 439.827307 440.463362 441.097364 441.729323 442.359249
## [331] 442.987152 443.613041 444.236926 444.858817 445.478723 446.096654
## [337] 446.712619 447.326628 447.938689 448.548813 449.157007 449.763282
## [343] 450.367647 450.970110 451.570681 452.169367 452.766180 453.361126
## [349] 453.954214 454.545455 455.134855 455.722424 456.308170 456.892101
## [355] 457.474227 458.054555 458.633094 459.209851 459.784836 460.358056
## [361] 460.929520 461.499235 462.067210 462.633452 463.197970 463.760770
## [367] 464.321862 464.881253 465.438951 465.994962 466.549296 467.101959
## [373] 467.652959 468.202303 468.750000 469.296056 469.840479 470.383275
## [379] 470.924453 471.464020 472.001982 472.538347 473.073123 473.606315
## [385] 474.137931 474.667978 475.196464 475.723394 476.248776 476.772616
## [391] 477.294922 477.815700 478.334956 478.852698 479.368932 479.883665
## [397] 480.396902 480.908652 481.418919 481.927711 482.435034 482.940894
## [403] 483.445298 483.948251 484.449761 484.949833 485.448473 485.945688
## [409] 486.441484 486.935867 487.428843 487.920417 488.410596 488.899386
## [415] 489.386792 489.872821 490.357479 490.840770 491.322702 491.803279
## [421] 492.282507 492.760392 493.236940 493.712156 494.186047 494.658616
## [427] 495.129870 495.599815 496.068455 496.535797 497.001845 497.466605
## [433] 497.930083 498.392283 498.853211 499.312872 499.771272 500.228415
## [439] 500.684307 501.138952 501.592357 502.044525 502.495463 502.945174
## [445] 503.393665 503.840940 504.287004 504.731861 505.175518 505.617978
## [451] 506.059246 506.499328 506.938227 507.375950 507.812500 508.247882
## [457] 508.682102 509.115162 509.547069 509.977827 510.407440 510.835913
## [463] 511.263251 511.689457 512.114537 512.538495 512.961336 513.383063
## [469] 513.803681 514.223195 514.641608 515.058926 515.475153 515.890292
## [475] 516.304348 516.717325 517.129228 517.540061 517.949827 518.358531
## [481] 518.766178 519.172770 519.578313 519.982810 520.386266 520.788684
## [487] 521.190068 521.590423 521.989752 522.388060 522.785349 523.181625
## [493] 523.576890 523.971150 524.364407 524.756665 525.147929 525.538202
## [499] 525.927487 526.315789 526.703112 527.089458 527.474832 527.859238
## [505] 528.242678 528.625157 529.006678 529.387245 529.766861 530.145530
## [511] 530.523256 530.900041 531.275891 531.650807 532.024793 532.397854
## [517] 532.769992 533.141210 533.511513 533.880903 534.249385 534.616960
## [523] 534.983633 535.349407 535.714286 536.078272 536.441368 536.803579
## [529] 537.164907 537.525355 537.884927 538.243626 538.601455 538.958417
## [535] 539.314516 539.669754 540.024135 540.377662 540.730337 541.082164
## [541] 541.433147 541.783287 542.132588 542.481053 542.828685 543.175487
## [547] 543.521463 543.866614 544.210944 544.554455 544.897152 545.239036
## [553] 545.580110 545.920378 546.259843 546.598506 546.936371 547.273441
## [559] 547.609718 547.945205 548.279906 548.613823 548.946958 549.279314
## [565] 549.610895 549.941702 550.271739 550.601008 550.929512 551.257253
## [571] 551.584235 551.910459 552.235929 552.560647 552.884615 553.207837
## [577] 553.530315 553.852051 554.173047 554.493308 554.812834 555.131629
## [583] 555.449695 555.767035 556.083650 556.399544 556.714719 557.029178
## [589] 557.342922 557.655955 557.968278 558.279894 558.590806 558.901016
## [595] 559.210526 559.519339 559.827457 560.134882 560.441617 560.747664
## [601] 561.053025 561.357702 561.661699 561.965017 562.267658 562.569625
## [607] 562.870920 563.171545 563.471503 563.770795 564.069424 564.367392
## [613] 564.664702 564.961354 565.257353 565.552699 565.847395 566.141444
## [619] 566.434846 566.727605 567.019722 567.311200 567.602041 567.892246
## [625] 568.181818 568.470759 568.759071 569.046756 569.333816 569.620253
## [631] 569.906069 570.191267 570.475847 570.759813 571.043165 571.325907
## [637] 571.608040 571.889566 572.170487 572.450805 572.730522 573.009639
## [643] 573.288160 573.566085 573.843416 574.120156 574.396307 574.671869
## [649] 574.946846 575.221239 575.495050 575.768280 576.040932 576.313007
## [655] 576.584507 576.855434 577.125791 577.395577 577.664797 577.933450
## [661] 578.201540 578.469067 578.736034 579.002442 579.268293 579.533589
## [667] 579.798331 580.062522 580.326162 580.589255 580.851801 581.113801
## [673] 581.375259 581.636175 581.896552 582.156390 582.415692 582.674459
## [679] 582.932692 583.190395 583.447567 583.704211 583.960328 584.215921
## [685] 584.470990 584.725537 584.979564 585.233072 585.486064 585.738540
## [691] 585.990502 586.241952 586.492891 586.743321 586.993243 587.242659
## [697] 587.491571 587.739980 587.987887 588.235294 588.482203 588.728615
## [703] 588.974531 589.219953 589.464883 589.709322 589.953271 590.196732
## [709] 590.439707 590.682196 590.924202 591.165726 591.406768 591.647332
## [715] 591.887417 592.127026 592.366160 592.604820 592.843008 593.080725
## [721] 593.317972 593.554752 593.791064 594.026912 594.262295 594.497216
## [727] 594.731675 594.965675 595.199216 595.432300 595.664928 595.897102
## [733] 596.128822 596.360091 596.590909 596.821278 597.051199 597.280673
## [739] 597.509702 597.738288 597.966430 598.194131 598.421392 598.648214
## [745] 598.874598 599.100546 599.326059 599.551138 599.775785 600.000000
## [751] 600.223785 600.447141 600.670070 600.892573 601.114650 601.336303
## [757] 601.557533 601.778342 601.998731 602.218700 602.438252 602.657387
## [763] 602.876106 603.094411 603.312303 603.529783 603.746851 603.963511
## [769] 604.179761 604.395604 604.611041 604.826073 605.040701 605.254926
## [775] 605.468750 605.682173 605.895197 606.107822 606.320050 606.531882
## [781] 606.743319 606.954362 607.165012 607.375271 607.585139 607.794618
## [787] 608.003708 608.212411 608.420728 608.628659 608.836207 609.043371
## [793] 609.250154 609.456555 609.662577 609.868219 610.073484 610.278373
## [799] 610.482885 610.687023
plot(x, grouse,
     main ="Adult Grouse Population Size vs. Expected Recruitment",
     xlab ="Adult Grouse Population Size",
     ylab ="Recruits",
     pch =20)
abline(a=0,b=1,col ="red")

B. Using the graph produced in part A, determine the maximum recruitment of turkeys and grouse. This will later determine the maximum number of individuals of each species that can be harvested in a year, which is the difference between recruitment and your 1:1 line (“surplus production”). Remember to report the units when you give your answer. Hint: R has functions for finding the min, mean, max, etc. of any vector of numbers (2 points)

max(turkey)
## [1] 746.855
max(grouse)
## [1] 610.687

C. What is the population size where sustainable yield (harvest) is expected to be maximized for each species? (3 points)

Hint: to figure this out, you will first need to find the largest distance between the replacement line and each of the other lines. For each species, you can subtract the Y values of the replacement line from the recruitment function and save them as a vector. Then use the function which.max() to find the value of N where the difference is maximized. This will be the number of fowl producing the MSY. Write a description of your results in a sentence, including units.

##Turkey max 206 ##grouse max 201

turkeymax<-c((a*x*exp(-b*x)) - x)
turkeymax
##   [1]    5.9759056   11.9037881   17.7838956   23.6164749   29.4017715
##   [6]   35.1400302   40.8314943   46.4764060   52.0750067   57.6275363
##  [11]   63.1342339   68.5953374   74.0110834   79.3817079   84.7074452
##  [16]   89.9885290   95.2251917  100.4176648  105.5661784  110.6709619
##  [21]  115.7322435  120.7502504  125.7252085  130.6573430  135.5468779
##  [26]  140.3940361  145.1990397  149.9621094  154.6834653  159.3633262
##  [31]  164.0019100  168.5994336  173.1561127  177.6721623  182.1477963
##  [36]  186.5832274  190.9786677  195.3343279  199.6504181  203.9271471
##  [41]  208.1647230  212.3633527  216.5232424  220.6445971  224.7276210
##  [46]  228.7725173  232.7794882  236.7487350  240.6804582  244.5748571
##  [51]  248.4321303  252.2524753  256.0360889  259.7831668  263.4939037
##  [56]  267.1684938  270.8071299  274.4100043  277.9773081  281.5092316
##  [61]  285.0059645  288.4676951  291.8946112  295.2868995  298.6447462
##  [66]  301.9683360  305.2578534  308.5134816  311.7354030  314.9237994
##  [71]  318.0788515  321.2007391  324.2896415  327.3457368  330.3692024
##  [76]  333.3602149  336.3189500  339.2455827  342.1402870  345.0032363
##  [81]  347.8346030  350.6345587  353.4032743  356.1409198  358.8476645
##  [86]  361.5236768  364.1691243  366.7841740  369.3689918  371.9237432
##  [91]  374.4485925  376.9437035  379.4092392  381.8453618  384.2522327
##  [96]  386.6300125  388.9788612  391.2989379  393.5904010  395.8534082
## [101]  398.0881163  400.2946815  402.4732592  404.6240040  406.7470701
## [106]  408.8426104  410.9107777  412.9517235  414.9655989  416.9525544
## [111]  418.9127394  420.8463029  422.7533931  424.6341575  426.4887429
## [116]  428.3172953  430.1199601  431.8968821  433.6482052  435.3740728
## [121]  437.0746276  438.7500114  440.4003656  442.0258308  443.6265469
## [126]  445.2026532  446.7542883  448.2815901  449.7846960  451.2637424
## [131]  452.7188655  454.1502005  455.5578822  456.9420444  458.3028207
## [136]  459.6403437  460.9547456  462.2461579  463.5147113  464.7605362
## [141]  465.9837620  467.1845178  468.3629319  469.5191320  470.6532452
## [146]  471.7653982  472.8557166  473.9243259  474.9713507  475.9969151
## [151]  477.0011426  477.9841560  478.9460777  479.8870294  480.8071321
## [156]  481.7065065  482.5852724  483.4435492  484.2814558  485.0991102
## [161]  485.8966303  486.6741330  487.4317348  488.1695518  488.8876992
## [166]  489.5862919  490.2654442  490.9252697  491.5658816  492.1873925
## [171]  492.7899145  493.3735590  493.9384372  494.4846593  495.0123352
## [176]  495.5215744  496.0124856  496.4851771  496.9397568  497.3763318
## [181]  497.7950088  498.1958940  498.5790932  498.9447114  499.2928533
## [186]  499.6236231  499.9371243  500.2334601  500.5127330  500.7750453
## [191]  501.0204984  501.2491935  501.4612312  501.6567115  501.8357343
## [196]  501.9983985  502.1448028  502.2750453  502.3892238  502.4874355
## [201]  502.5697770  502.6363446  502.6872341  502.7225407  502.7423593
## [206]  502.7467843  502.7359095  502.7098283  502.6686337  502.6124183
## [211]  502.5412740  502.4552925  502.3545649  502.2391819  502.1092337
## [216]  501.9648100  501.8060003  501.6328935  501.4455780  501.2441417
## [221]  501.0286724  500.7992571  500.5559826  500.2989351  500.0282004
## [226]  499.7438641  499.4460111  499.1347259  498.8100928  498.4721954
## [231]  498.1211171  497.7569407  497.3797487  496.9896233  496.5866460
## [236]  496.1708981  495.7424605  495.3014135  494.8478373  494.3818114
## [241]  493.9034151  493.4127272  492.9098261  492.3947900  491.8676964
## [246]  491.3286225  490.7776454  490.2148414  489.6402866  489.0540568
## [251]  488.4562274  487.8468731  487.2260687  486.5938883  485.9504057
## [256]  485.2956944  484.6298275  483.9528777  483.2649172  482.5660182
## [261]  481.8562521  481.1356902  480.4044034  479.6624623  478.9099370
## [266]  478.1468972  477.3734125  476.5895519  475.7953843  474.9909779
## [271]  474.1764008  473.3517207  472.5170051  471.6723208  470.8177346
## [276]  469.9533127  469.0791213  468.1952258  467.3016917  466.3985839
## [281]  465.4859670  464.5639054  463.6324630  462.6917036  461.7416904
## [286]  460.7824864  459.8141543  458.8367566  457.8503551  456.8550116
## [291]  455.8507875  454.8377440  453.8159417  452.7854411  451.7463023
## [296]  450.6985853  449.6423494  448.5776539  447.5045577  446.4231195
## [301]  445.3333974  444.2354496  443.1293336  442.0151068  440.8928265
## [306]  439.7625493  438.6243318  437.4782301  436.3243002  435.1625977
## [311]  433.9931780  432.8160960  431.6314065  430.4391641  429.2394228
## [316]  428.0322366  426.8176591  425.5957436  424.3665433  423.1301108
## [321]  421.8864987  420.6357592  419.3779442  418.1131055  416.8412944
## [326]  415.5625621  414.2769595  412.9845371  411.6853452  410.3794341
## [331]  409.0668533  407.7476525  406.4218810  405.0895878  403.7508216
## [336]  402.4056309  401.0540640  399.6961689  398.3319932  396.9615845
## [341]  395.5849900  394.2022566  392.8134311  391.4185599  390.0176894
## [346]  388.6108653  387.1981336  385.7795397  384.3551287  382.9249459
## [351]  381.4890358  380.0474430  378.6002118  377.1473862  375.6890102
## [356]  374.2251271  372.7557804  371.2810133  369.8008684  368.3153886
## [361]  366.8246162  365.3285934  363.8273622  362.3209643  360.8094412
## [366]  359.2928341  357.7711843  356.2445323  354.7129190  353.1763847
## [371]  351.6349696  350.0887136  348.5376564  346.9818377  345.4212966
## [376]  343.8560723  342.2862037  340.7117294  339.1326880  337.5491175
## [381]  335.9610562  334.3685418  332.7716119  331.1703039  329.5646552
## [386]  327.9547025  326.3404829  324.7220329  323.0993888  321.4725869
## [391]  319.8416632  318.2066534  316.5675933  314.9245181  313.2774631
## [396]  311.6264633  309.9715536  308.3127686  306.6501426  304.9837100
## [401]  303.3135048  301.6395609  299.9619119  298.2805914  296.5956326
## [406]  294.9070687  293.2149326  291.5192570  289.8200746  288.1174177
## [411]  286.4113184  284.7018089  282.9889209  281.2726862  279.5531362
## [416]  277.8303022  276.1042154  274.3749067  272.6424069  270.9067466
## [421]  269.1679562  267.4260660  265.6811062  263.9331065  262.1820968
## [426]  260.4281067  258.6711655  256.9113026  255.1485470  253.3829276
## [431]  251.6144731  249.8432122  248.0691733  246.2923846  244.5128743
## [436]  242.7306703  240.9458003  239.1582920  237.3681728  235.5754701
## [441]  233.7802110  231.9824225  230.1821313  228.3793643  226.5741479
## [446]  224.7665085  222.9564724  221.1440655  219.3293138  217.5122431
## [451]  215.6928790  213.8712469  212.0473722  210.2212801  208.3929955
## [456]  206.5625434  204.7299485  202.8952354  201.0584285  199.2195521
## [461]  197.3786305  195.5356875  193.6907471  191.8438331  189.9949690
## [466]  188.1441782  186.2914842  184.4369101  182.5804789  180.7222135
## [471]  178.8621367  177.0002712  175.1366395  173.2712639  171.4041666
## [476]  169.5353699  167.6648955  165.7927655  163.9190014  162.0436249
## [481]  160.1666575  158.2881204  156.4080348  154.5264219  152.6433025
## [486]  150.7586975  148.8726276  146.9851132  145.0961750  143.2058332
## [491]  141.3141079  139.4210193  137.5265873  135.6308317  133.7337723
## [496]  131.8354286  129.9358201  128.0349662  126.1328860  124.2295988
## [501]  122.3251234  120.4194789  118.5126838  116.6047570  114.6957169
## [506]  112.7855819  110.8743704  108.9621005  107.0487904  105.1344580
## [511]  103.2191211  101.3027976   99.3855049   97.4672608   95.5480825
## [516]   93.6279875   91.7069928   89.7851157   87.8623730   85.9387817
## [521]   84.0143585   82.0891201   80.1630831   78.2362640   76.3086790
## [526]   74.3803444   72.4512765   70.5214912   68.5910045   66.6598321
## [531]   64.7279900   62.7954937   60.8623587   58.9286006   56.9942346
## [536]   55.0592760   53.1237399   51.1876414   49.2509955   47.3138170
## [541]   45.3761207   43.4379212   41.4992332   39.5600710   37.6204491
## [546]   35.6803818   33.7398833   31.7989677   29.8576489   27.9159410
## [551]   25.9738577   24.0314128   22.0886200   20.1454927   18.2020445
## [556]   16.2582888   14.3142388   12.3699078   10.4253089    8.4804551
## [561]    6.5353593    4.5900345    2.6444933    0.6987486   -1.2471872
## [566]   -3.1933015   -5.1395818   -7.0860159   -9.0325914  -10.9792961
## [571]  -12.9261180  -14.8730450  -16.8200651  -18.7671666  -20.7143377
## [576]  -22.6615665  -24.6088416  -26.5561514  -28.5034844  -30.4508292
## [581]  -32.3981746  -34.3455092  -36.2928221  -38.2401019  -40.1873379
## [586]  -42.1345190  -44.0816345  -46.0286735  -47.9756253  -49.9224794
## [591]  -51.8692251  -53.8158521  -55.7623499  -57.7087081  -59.6549166
## [596]  -61.6009652  -63.5468437  -65.4925421  -67.4380504  -69.3833588
## [601]  -71.3284573  -73.2733364  -75.2179862  -77.1623972  -79.1065598
## [606]  -81.0504645  -82.9941019  -84.9374627  -86.8805377  -88.8233175
## [611]  -90.7657930  -92.7079552  -94.6497951  -96.5913038  -98.5324722
## [616] -100.4732917 -102.4137535 -104.3538488 -106.2935692 -108.2329060
## [621] -110.1718507 -112.1103949 -114.0485302 -115.9862483 -117.9235411
## [626] -119.8604002 -121.7968176 -123.7327853 -125.6682951 -127.6033393
## [631] -129.5379099 -131.4719990 -133.4055990 -135.3387021 -137.2713008
## [636] -139.2033873 -141.1349542 -143.0659940 -144.9964994 -146.9264629
## [641] -148.8558773 -150.7847353 -152.7130297 -154.6407535 -156.5678995
## [646] -158.4944608 -160.4204303 -162.3458013 -164.2705667 -166.1947199
## [651] -168.1182541 -170.0411625 -171.9634387 -173.8850759 -175.8060676
## [656] -177.7264075 -179.6460890 -181.5651058 -183.4834516 -185.4011200
## [661] -187.3181050 -189.2344002 -191.1499996 -193.0648972 -194.9790869
## [666] -196.8925627 -198.8053188 -200.7173492 -202.6286481 -204.5392099
## [671] -206.4490287 -208.3580988 -210.2664147 -212.1739708 -214.0807615
## [676] -215.9867814 -217.8920250 -219.7964870 -221.7001619 -223.6030445
## [681] -225.5051296 -227.4064119 -229.3068862 -231.2065475 -233.1053907
## [686] -235.0034108 -236.9006027 -238.7969615 -240.6924824 -242.5871605
## [691] -244.4809910 -246.3739690 -248.2660900 -250.1573492 -252.0477419
## [696] -253.9372637 -255.8259098 -257.7136759 -259.6005574 -261.4865500
## [701] -263.3716492 -265.2558506 -267.1391501 -269.0215432 -270.9030259
## [706] -272.7835938 -274.6632429 -276.5419690 -278.4197681 -280.2966362
## [711] -282.1725692 -284.0475632 -285.9216143 -287.7947186 -289.6668723
## [716] -291.5380716 -293.4083127 -295.2775919 -297.1459054 -299.0132498
## [721] -300.8796212 -302.7450162 -304.6094313 -306.4728628 -308.3353074
## [726] -310.1967615 -312.0572219 -313.9166851 -315.7751478 -317.6326067
## [731] -319.4890586 -321.3445002 -323.1989283 -325.0523398 -326.9047315
## [736] -328.7561004 -330.6064434 -332.4557575 -334.3040396 -336.1512869
## [741] -337.9974964 -339.8426652 -341.6867904 -343.5298692 -345.3718989
## [746] -347.2128766 -349.0527996 -350.8916652 -352.7294708 -354.5662137
## [751] -356.4018912 -358.2365009 -360.0700401 -361.9025064 -363.7338972
## [756] -365.5642101 -367.3934427 -369.2215925 -371.0486573 -372.8746345
## [761] -374.6995221 -376.5233175 -378.3460187 -380.1676233 -381.9881292
## [766] -383.8075342 -385.6258362 -387.4430330 -389.2591226 -391.0741029
## [771] -392.8879718 -394.7007274 -396.5123677 -398.3228907 -400.1322945
## [776] -401.9405772 -403.7477370 -405.5537719 -407.3586802 -409.1624601
## [781] -410.9651099 -412.7666276 -414.5670117 -416.3662605 -418.1643723
## [786] -419.9613454 -421.7571782 -423.5518692 -425.3454168 -427.1378194
## [791] -428.9290754 -430.7191835 -432.5081422 -434.2959499 -436.0826053
## [796] -437.8681069 -439.6524535 -441.4356436 -443.2176759 -444.9985490
which.max(turkeymax)
## [1] 206
grousemax<-c((1/(a2+b2/x)) - x)
grousemax
##   [1]    1.8473804    3.6753689    5.4841629    7.2739572    9.0449438
##   [6]   10.7973124   12.5312500   14.2469410   15.9445676   17.6243094
##  [11]   19.2863436   20.9308452   22.5579869   24.1679389   25.7608696
##  [16]   27.3369447   28.8963283   30.4391819   31.9656652   33.4759358
##  [21]   34.9701493   36.4484591   37.9110169   39.3579725   40.7894737
##  [26]   42.2056663   43.6066946   44.9927007   46.3638254   47.7202073
##  [31]   49.0619835   50.3892894   51.7022587   53.0010235   54.2857143
##  [36]   55.5564598   56.8133874   58.0566229   59.2862903   60.5025126
##  [41]   61.7054108   62.8951049   64.0717131   65.2353525   66.3861386
##  [46]   67.5241856   68.6496063   69.7625123   70.8630137   71.9512195
##  [51]   73.0272374   74.0911736   75.1431335   76.1832208   77.2115385
##  [56]   78.2281879   79.2332696   80.2268827   81.2091255   82.1800948
##  [61]   83.1398866   84.0885957   85.0263158   85.9531396   86.8691589
##  [66]   87.7744641   88.6691450   89.5532901   90.4269871   91.2903226
##  [71]   92.1433824   92.9862511   93.8190128   94.6417502   95.4545455
##  [76]   96.2574796   97.0506329   97.8340848   98.6079137   99.3721973
##  [81]  100.1270125  100.8724353  101.6085409  102.3354037  103.0530973
##  [86]  103.7616946  104.4612676  105.1518876  105.8336252  106.5065502
##  [91]  107.1707317  107.8262381  108.4731369  109.1114952  109.7413793
##  [96]  110.3628547  110.9759863  111.5808383  112.1774744  112.7659574
## [101]  113.3463497  113.9187130  114.4831081  115.0395956  115.5882353
## [106]  116.1290863  116.6622074  117.1876564  117.7054908  118.2157676
## [111]  118.7185430  119.2138728  119.7018122  120.1824158  120.6557377
## [116]  121.1218316  121.5807504  122.0325468  122.4772727  122.9149798
## [121]  123.3457189  123.7695407  124.1864952  124.5966319  125.0000000
## [126]  125.3966480  125.7866242  126.1699762  126.5467512  126.9169960
## [131]  127.2807571  127.6380803  127.9890110  128.3335944  128.6718750
## [136]  129.0038971  129.3297045  129.6493406  129.9628483  130.2702703
## [141]  130.5716487  130.8670254  131.1564417  131.4399388  131.7175573
## [146]  131.9893374  132.2553191  132.5155421  132.7700454  133.0188679
## [151]  133.2620482  133.4996243  133.7316342  133.9581152  134.1791045
## [156]  134.3946389  134.6047548  134.8094885  135.0088757  135.2029520
## [161]  135.3917526  135.5753123  135.7536657  135.9268471  136.0948905
## [166]  136.2578296  136.4156977  136.5685279  136.7163531  136.8592058
## [171]  136.9971182  137.1301222  137.2582496  137.3815319  137.5000000
## [176]  137.6136850  137.7226174  137.8268275  137.9263456  138.0212014
## [181]  138.1114245  138.1970443  138.2780899  138.3545900  138.4265734
## [186]  138.4940684  138.5571031  138.6157054  138.6699029  138.7197232
## [191]  138.7651934  138.8063405  138.8431912  138.8757721  138.9041096
## [196]  138.9282297  138.9481583  138.9639210  138.9755435  138.9830508
## [201]  138.9864682  138.9858204  138.9811321  138.9724277  138.9597315
## [206]  138.9430676  138.9224599  138.8979320  138.8695073  138.8372093
## [211]  138.8010610  138.7610854  138.7173052  138.6697429  138.6184211
## [216]  138.5633618  138.5045872  138.4421190  138.3759791  138.3061889
## [221]  138.2327698  138.1557430  138.0751295  137.9909502  137.9032258
## [226]  137.8119768  137.7172237  137.6189865  137.5172855  137.4121406
## [231]  137.3035714  137.1915977  137.0762389  136.9575143  136.8354430
## [236]  136.7100442  136.5813367  136.4493392  136.3140704  136.1755486
## [241]  136.0337922  135.8888195  135.7406484  135.5892968  135.4347826
## [246]  135.2771234  135.1163366  134.9524398  134.7854501  134.6153846
## [251]  134.4422604  134.2660944  134.0869033  133.9047037  133.7195122
## [256]  133.5313451  133.3402187  133.1461492  132.9491525  132.7492447
## [261]  132.5464415  132.3407586  132.1322115  131.9208158  131.7065868
## [266]  131.4895397  131.2696897  131.0470518  130.8216409  130.5934718
## [271]  130.3625592  130.1289178  129.8925620  129.6535062  129.4117647
## [276]  129.1673517  128.9202814  128.6705676  128.4182243  128.1632653
## [281]  127.9057043  127.6455549  127.3828306  127.1175449  126.8497110
## [286]  126.5793422  126.3064516  126.0310523  125.7531573  125.4727794
## [291]  125.1899314  124.9046259  124.6168757  124.3266932  124.0340909
## [296]  123.7390811  123.4416761  123.1418881  122.8397291  122.5352113
## [301]  122.2283465  121.9191465  121.6076233  121.2937885  120.9776536
## [306]  120.6592303  120.3385301  120.0155642  119.6903441  119.3628809
## [311]  119.0331858  118.7012700  118.3671444  118.0308200  117.6923077
## [316]  117.3516182  117.0087623  116.6637507  116.3165939  115.9673025
## [321]  115.6158868  115.2623574  114.9067245  114.5489984  114.1891892
## [326]  113.8273071  113.4633621  113.0973642  112.7293233  112.3592493
## [331]  111.9871520  111.6130412  111.2369264  110.8588173  110.4787234
## [336]  110.0966543  109.7126193  109.3266278  108.9386892  108.5488127
## [341]  108.1570074  107.7632825  107.3676471  106.9701101  106.5706806
## [346]  106.1693675  105.7661795  105.3611256  104.9542144  104.5454545
## [351]  104.1348548  103.7224236  103.3081696  102.8921012  102.4742268
## [356]  102.0545548  101.6330935  101.2098512  100.7848361  100.3580563
## [361]   99.9295199   99.4992351   99.0672098   98.6334520   98.1979695
## [366]   97.7607704   97.3218623   96.8812532   96.4389506   95.9949622
## [371]   95.5492958   95.1019588   94.6529589   94.2023035   93.7500000
## [376]   93.2960559   92.8404786   92.3832753   91.9244533   91.4640199
## [381]   91.0019822   90.5383474   90.0731225   89.6063148   89.1379310
## [386]   88.6679784   88.1964637   87.7233938   87.2487757   86.7726161
## [391]   86.2949219   85.8156997   85.3349562   84.8526981   84.3689320
## [396]   83.8836646   83.3969022   82.9086515   82.4189189   81.9277108
## [401]   81.4350337   80.9408938   80.4452975   79.9482511   79.4497608
## [406]   78.9498328   78.4484733   77.9456884   77.4414843   76.9358670
## [411]   76.4288425   75.9204169   75.4105960   74.8993859   74.3867925
## [416]   73.8728215   73.3574788   72.8407703   72.3227017   71.8032787
## [421]   71.2825070   70.7603923   70.2369403   69.7121565   69.1860465
## [426]   68.6586159   68.1298701   67.5998147   67.0684551   66.5357968
## [431]   66.0018450   65.4666053   64.9300828   64.3922830   63.8532110
## [436]   63.3128722   62.7712717   62.2284148   61.6843066   61.1389522
## [441]   60.5923567   60.0445252   59.4954628   58.9451744   58.3936652
## [446]   57.8409399   57.2870036   56.7318612   56.1755176   55.6179775
## [451]   55.0592460   54.4993277   53.9382274   53.3759499   52.8125000
## [456]   52.2478823   51.6821015   51.1151623   50.5470693   49.9778271
## [461]   49.4074402   48.8359133   48.2632509   47.6894574   47.1145374
## [466]   46.5384954   45.9613357   45.3830627   44.8036810   44.2231947
## [471]   43.6416084   43.0589262   42.4751526   41.8902917   41.3043478
## [476]   40.7173252   40.1292281   39.5400606   38.9498270   38.3585313
## [481]   37.7661777   37.1727704   36.5783133   35.9828105   35.3862661
## [486]   34.7886841   34.1900685   33.5904233   32.9897523   32.3880597
## [491]   31.7853492   31.1816248   30.5768904   29.9711498   29.3644068
## [496]   28.7566653   28.1479290   27.5382018   26.9274874   26.3157895
## [501]   25.7031119   25.0894582   24.4748322   23.8592375   23.2426778
## [506]   22.6251567   22.0066778   21.3872447   20.7668609   20.1455301
## [511]   19.5232558   18.9000415   18.2758906   17.6508068   17.0247934
## [516]   16.3978539   15.7699918   15.1412104   14.5115132   13.8809035
## [521]   13.2493847   12.6169603   11.9836334   11.3494074   10.7142857
## [526]   10.0782715    9.4413681    8.8035787    8.1649066    7.5253550
## [531]    6.8849271    6.2436261    5.6014551    4.9584174    4.3145161
## [536]    3.6697543    3.0241352    2.3776617    1.7303371    1.0821643
## [541]    0.4331465   -0.2167133   -0.8674121   -1.5189469   -2.1713147
## [546]   -2.8245125   -3.4785374   -4.1333863   -4.7890563   -5.4455446
## [551]   -6.1028481   -6.7609640   -7.4198895   -8.0796216   -8.7401575
## [556]   -9.4014943  -10.0636292  -10.7265594  -11.3902821  -12.0547945
## [561]  -12.7200938  -13.3861773  -14.0530421  -14.7206856  -15.3891051
## [566]  -16.0582977  -16.7282609  -17.3989919  -18.0704880  -18.7427466
## [571]  -19.4157651  -20.0895407  -20.7640709  -21.4393531  -22.1153846
## [576]  -22.7921629  -23.4696853  -24.1479494  -24.8269525  -25.5066922
## [581]  -26.1871658  -26.8683709  -27.5503049  -28.2329654  -28.9163498
## [586]  -29.6004558  -30.2852807  -30.9708223  -31.6570780  -32.3440454
## [591]  -33.0317221  -33.7201056  -34.4091937  -35.0989838  -35.7894737
## [596]  -36.4806609  -37.1725431  -37.8651180  -38.5583832  -39.2523364
## [601]  -39.9469754  -40.6422977  -41.3383010  -42.0349833  -42.7323420
## [606]  -43.4303750  -44.1290801  -44.8284550  -45.5284974  -46.2292052
## [611]  -46.9305761  -47.6326079  -48.3352985  -49.0386456  -49.7426471
## [616]  -50.4473008  -51.1526045  -51.8585562  -52.5651537  -53.2723949
## [621]  -53.9802776  -54.6887997  -55.3979592  -56.1077539  -56.8181818
## [626]  -57.5292408  -58.2409289  -58.9532439  -59.6661839  -60.3797468
## [631]  -61.0939306  -61.8087333  -62.5241528  -63.2401873  -63.9568345
## [636]  -64.6740927  -65.3919598  -66.1104338  -66.8295129  -67.5491950
## [641]  -68.2694782  -68.9903606  -69.7118402  -70.4339152  -71.1565836
## [646]  -71.8798436  -72.6036932  -73.3281305  -74.0531538  -74.7787611
## [651]  -75.5049505  -76.2317202  -76.9590685  -77.6869933  -78.4154930
## [656]  -79.1445656  -79.8742094  -80.6044226  -81.3352034  -82.0665499
## [661]  -82.7984605  -83.5309332  -84.2639665  -84.9975584  -85.7317073
## [666]  -86.4664114  -87.2016690  -87.9374783  -88.6738376  -89.4107452
## [671]  -90.1481994  -90.8861985  -91.6247408  -92.3638246  -93.1034483
## [676]  -93.8436101  -94.5843083  -95.3255414  -96.0673077  -96.8096055
## [681]  -97.5524332  -98.2957891  -99.0396717  -99.7840793 -100.5290102
## [686] -101.2744630 -102.0204360 -102.7669275 -103.5139361 -104.2614601
## [691] -105.0094980 -105.7580481 -106.5071090 -107.2566791 -108.0067568
## [696] -108.7573405 -109.5084289 -110.2600202 -111.0121131 -111.7647059
## [701] -112.5177972 -113.2713854 -114.0254692 -114.7800469 -115.5351171
## [706] -116.2906782 -117.0467290 -117.8032678 -118.5602931 -119.3178037
## [711] -120.0757979 -120.8342743 -121.5932316 -122.3526682 -123.1125828
## [716] -123.8729739 -124.6338401 -125.3951799 -126.1569921 -126.9192751
## [721] -127.6820276 -128.4452483 -129.2089356 -129.9730883 -130.7377049
## [726] -131.5027841 -132.2683246 -133.0343249 -133.8007838 -134.5676998
## [731] -135.3350717 -136.1028981 -136.8711776 -137.6399090 -138.4090909
## [736] -139.1787220 -139.9488010 -140.7193266 -141.4902975 -142.2617124
## [741] -143.0335700 -143.8058691 -144.5786082 -145.3517863 -146.1254019
## [746] -146.8994539 -147.6739409 -148.4488618 -149.2242152 -150.0000000
## [751] -150.7762148 -151.5528585 -152.3299298 -153.1074275 -153.8853503
## [756] -154.6636971 -155.4424666 -156.2216577 -157.0012690 -157.7812995
## [761] -158.5617479 -159.3426131 -160.1238938 -160.9055889 -161.6876972
## [766] -162.4702175 -163.2531486 -164.0364895 -164.8202388 -165.6043956
## [771] -166.3889586 -167.1739267 -167.9592987 -168.7450735 -169.5312500
## [776] -170.3178270 -171.1048035 -171.8921782 -172.6799502 -173.4681182
## [781] -174.2566812 -175.0456380 -175.8349876 -176.6247289 -177.4148607
## [786] -178.2053820 -178.9962917 -179.7875888 -180.5792721 -181.3713405
## [791] -182.1637931 -182.9566287 -183.7498463 -184.5434449 -185.3374233
## [796] -186.1317806 -186.9265156 -187.7216274 -188.5171149 -189.3129771
which.max(grousemax)
## [1] 201

Exercise 5. Constant harvest and constant effort harvest. (15 points total)

Now lets explicity add harvest to the logistic growth equation.

Constant harvest rate H: N(t + 1) = N(t) + r * N(t) * (1 - N(t)/K) - H

Constant effort harvest with fishing mortality F: N(t + 1) = N(t) + r * N(t) * (1 - N(t)/K) - F * N(t)

We can again set our r, K and N0 values. We’ll start the population at carrying capacity

    r <- 0.3
    K <- 500
    N0 <- 500

A. Now simulate the population under constant harvest rates of H = 20, 30, 40 and graph the output of N(t) through time using y axis limits from 0 to 600 for all graphs. (5 points)

##Harvest rate of 20
H <-20 
N <- rep (NA,numyears) 
N[1] <-N0 
for ( t in 1 : (numyears-1)){ 
  N[t+1] = N [t]+r*N[t] * (1 -N[t]/K) -H }
plot ( N,
       main = " N ( t ) through Time ( H = 20 ) ",
       xlab = " Years " , 
       ylab = " Population ", 
       ylim = c ( 0 , 600 ) )

##Harvest rate of 30
H<-30
N <- rep (NA,numyears) 
N[1] <-N0 
for ( t in 1 : (numyears-1)){ 
  N[t+1] = N [t]+r*N[t] * (1 -N[t]/K) -H }
plot ( N,
       main = " N ( t ) through Time ( H = 30 ) ",
       xlab = " Years " , 
       ylab = " Population ", 
       ylim = c ( 0 , 600 ) )

##Harvest rate of 40
H<-40
N <- rep (NA,numyears) 
N[1] <-N0 
for ( t in 1 : (numyears-1)){ 
  N[t+1] = N [t]+r*N[t] * (1 -N[t]/K) -H }
plot ( N,
       main = " N ( t ) through Time ( H = 40 ) ",
       xlab = " Years " , 
       ylab = " Population ", 
       ylim = c ( 0 , 600 ) )

Describe the results

As the harvest rate increases the population decreases at a greater rate over time.

B. Plot dN/dt and the three H values on the same plot. (4 points)

Hint: 1. Recall that dN/dt is not the same as N(t+1). 2. Use the abline() function to make horizontal lines. You can use the lty option to make the lines dashed or dotted if you so choose and the lwd option to change the line width. Label the axes.

Npop <- 1 : 500 
r <- 0.3 
K <- 500 
t <- 50 

dN <- r* Npop *( 1 - Npop /K )

plot (Npop , dN, 
       xlab = " Population", 
       ylab = " Change in Population",
       ylim = c (0,50), 
       pch = 19)
abline(h= 20, col= "yellow", lty= "twodash", lwd= 2)
abline(h= 30, col= "blue", lty= "twodash", lwd= 2)
abline(h= 40, col= "green", lty= "twodash", lwd= 2)

Describe the relationship between the graphs in parts A and B. How do the graphs in B tell you what the graphs in A must do?

The graphs in part A show the population with different harvest rates. The harvest rates keep the population below the maximum sustainable yield so the population numbers stay higher. Graph B shows the populations and how they would decline if they exceeded the MSY.

C. Now simulate the population under fishing mortality of F = 0.2, 0.3, 0.4 and graph the output of N(t) through time (3 points)

##fish mortality .2
F <- 0.2 
N <- rep ( NA , numyears ) 
N [ 1 ] <- N0 
for ( t in 1 : ( numyears - 1 ) ) { N [t + 1 ] = N [t ]+r* N [ t ] * ( 1 - N [t ]/ K ) - F * N [ t ] }

plot(N,
     main ="N(t) through Time (F = 0.2)",
     xlab ="Years",
     ylab ="Population",
     ylim =c(0,600))

##fish mortality .3
F <- 0.3 
N <- rep ( NA , numyears ) 
N [ 1 ] <- N0 
for ( t in 1 : ( numyears - 1 ) ) { N [t + 1 ] = N [t ]+r* N [ t ] * ( 1 - N [t ]/ K ) - F * N [ t ] }

plot(N,
     main ="N(t) through Time (F = 0.3)",
     xlab ="Years",
     ylab ="Population",
     ylim =c(0,600))

##fish mortality .4
F <- 0.4 
N <- rep ( NA , numyears ) 
N [ 1 ] <- N0 
for ( t in 1 : ( numyears - 1 ) ) { N [t + 1 ] = N [t ]+r* N [ t ] * ( 1 - N [t ]/ K ) - F * N [ t ] }

plot(N,
     main ="N(t) through Time (F = 0.4)",
     xlab ="Years",
     ylab ="Population",
     ylim =c(0,600))

Describe the results

##Higher mortality rates result in lower populations over time.

D. Plot dN/dt and the three F values on the same plot. (3 points)

Hint: Use the abline() function to make lines with intercept 0 and slope F. You can use the lty option to make the lines dashed or dotted if you so choose and the lwd option to change the line width. Label the axes.

Npop<-1:500
r<-0.3
K<-500
t<-50
dN<-r*Npop*(1- Npop/K)

plot(Npop, dN,
     xlab ="Population",
     ylab ="Change in Population",
     ylim =c(0,45),pch =20)
abline(a=0,b=0.2,col ="yellow",lty ="twodash",lwd =2)
abline(a=0,b=0.3,col ="blue",lty ="twodash",lwd =2)
abline(a=0,b=0.4,col ="green",lty ="twodash",lwd =2)

Describe the relationship between the graphs in parts C and D. How do the graphs in D tell you what the graphs in C must do?

##The graphs in D tell the graphs in C what rates to use to keep the populations at MSY.