This document contains R versions of the boxed examples from Chapter 6 of the “Analysis and Interpretation of Freshwater Fisheries Data” book. Some sections build on descriptions from previous sections, so each section may not stand completely on its own. More thorough discussions of the following items are available in linked vignettes: • the use of linear models in R in the preliminaries vignette, • differences between and the use of type-I, II, and III sums-of-squares in the preliminaries vignette, and • the use of “least-squares means” is found in the preliminaries vignette. The following additional packages are required to complete all of the examples (with the required functions noted as a comment and also noted in the specific examples below). > library(FSA) > library(car)

In addition, external tab-delimited text files are used to hold the data required for each example. These data are loaded into R in each example with read.table(). Before using read.table() the working directory of R must be set to where these files are located on your computer. The working directory for all data files on my computer is set with > setwd("C:/aaaWork/Web/fishR/BookVignettes/aiffd2007") In addition, I prefer to not show significance stars for hypothesis test output, reduce the margins on plots, alter the axis label positions, and reduce the axis tick length. In addition, contrasts are set in such a manner as to force R output to match SAS output for linear model summaries. All of these options are set with

The calculations in Box 6.1 do not rely on SAS- or R-specific code. However, I will reproduce the calculations below to illustrate how R can be used as a calculator. Take, for example, a hypothetical fish population consisting of a single age-group. At the start of a 12-month interval, the age-group consists of 1000 individuals, and at the end it has been reduced by mortality to 700. For this example, > N0 N12 ( d
# Initial population # Final population # Interval absolute mortality (i.e., number of deaths)

[1] 300 > A12 100*A12

# Interval (12 month) mortality rate

[1] 30 > ( Z12
# Instantaneous mortality rate

[1] 0.3566749 Now, suppose we wish to know the fraction of the population remaining, the number of individuals, and the number of deaths at the end of 4 and 8 months intervals. For this, Z12 must be partitioned into 4-month (Z4 ) and 8-month (Z8 ) estimates as > Z1 ( Z4
# Monthly instantaneous mortality rate # Four-month Z estimate

[1] 0.2116265 Note, below, the use of round() to round the results to a specified number of decimal places. This function requires two arguments – the value(s) to be rounded as the first argument and the number of decimal places as the second argument. Numbers of individuals remaining (survival) after 4 months (N4 ) and 8 months (N8 ) are represented by > d4 round(d4,0)

# Deaths in first four-months

[1] 112 > N4 round(N4,0)

# Estimated survivors after 4-months

[1] 888 > d8 round(d8,0)

# Deaths in first eight-months

[1] 212 > N8 round(N8,0)

# Estimated survivors after 4-months

[1] 788 > d8.4 round(d8.4,0)

# Deaths in second four-months

[1] 100 > d12.8 round(d12.8,0)

# Deaths in third four-months

[1] 88 The code below is a check of our work. > d4+d8.4+d12.8

# Total deaths in the three four-month periods

[1] 300

3

> (d4+d8.4+d12.8) == d

# Does this equal the first deaths calculation?

[1] TRUE

6.2

Heincke’s Method of Estimating Annual Mortality

From a reservoir, a large random sample of Spotted Bass (Micropterus punctulatus) was collected with electrofishing gear, and fish age was determined by inspecting otoliths. The number of fish in each age-class is given in the table in the text. There was some disagreement over the ages of the four largest and oldest fish, but they were all at least 7 years of age, so the data were coded accordingly. The low catch of age-1 fish relative to age-2 fish suggested that age-1 fish were not fully recruited to the electrofishing gear. 6.2.1

Preparing Data

The data for this box is very simple – number of fish in seven age-classes. Because of this simplicity the data can simply be entered into R using c() (for concatenation). The data could have been entered into an external file and read into R (I demonstrate this in Box 6.3). The data for this box are entered into two vectors below. Note that the colon on 1:7 constructs a sequence of all integers between 1 and 7 inclusive and that c() concatenates or combines the numbers in parentheses into a single vector. > age catch rbind(age,catch)

The author’s of the box limited the first calculation to only those fish that were age-2 or older. With this constraint the annual mortality calculation requires the total number of fish that were age-2 and older. In this example, the catch of fish age-2 and older can be found in positions two through seven of the catch vector. Certain positions of a vector can be obtained by appending the desired positions within square brackets immediately after the name of the vector. Asking for certain positions of the catch vector are illustrated below. > catch[2]

# 2nd position

[1] 407 > catch[c(2,4)] [1] 407

# 2nd & 4th positions

32

> catch[2:4] [1] 407 147

# 2nd through 4th positions 32

4

> catch[-2] [1] 257 147

# all but the 2nd position 32

17

5

4

The total catch of age-2 and older fish is isolated below and submitted to sum() to find the total catch for ages 2 to 7. The annual mortality rate is then the number of age-2 fish divided by this total (i.e., the proportion of all fish age-2 and older that were age-2). The standard error for the estimate of A is computed given the formula in the text. > ( N
# sum in positions 2 thru 7

[1] 612 > ( A
# annual mortality estimate

[1] 66.50327 > ( se.A
# SE of A

[1] 1.907862 The Heincke method essentially computes the proportion of a certain age out of a total number in an age range. This is the same as computing a binomial proportion – in fact the SE computed above is based on binomial theory. A confidence interval for a binary proportion can be computed with binCI() from the FSA package. This function requires the number of “successes” (i.e., the age in question) as the first argument and the total number of trials (i.e., all fish in the age categories) as the second argument. > 100*binCI(catch[2],N)

# default 95% CI for A

95% LCI 95% UCI 62.67124 70.12941 6.2.3

Heincke’s Method (Alternative)

The authors of the box mention that the estimated annual mortality rate, using the method above, for age-3 and older fish is 72%. This begs the question of whether there is an efficient method of computing the estimated annual mortality rate for each age (and older). Fortunately, this can be accomplished fairly efficiently with rcumsum() from the FSA package. This function computes the reverse cumulative summation for a vector. In other words, it will compute the total number of fish age-1 and older, then the total number of fish age-2 and older, then age-3 and older, etc. The reverse cumulative sums can be computed and saved to an object so that the estimated annual mortality rates can be calculated by dividing the catch vector by these reverse cumulative sums vector and the CIs can be computed quickly with binCI. > ( N
58

Assume that all the fish in a large sample were aged and the numbers of fish in each age-class were tallied, as shown in the table in the text. Along with constant (or near constant) recruitment and survival rates, the assumption of equal vulnerability to capture must be met. A cursory examination of the catch-at-age data suggests that the two youngest age-groups were not fully vulnerable, or recruited, to the gear (i.e., the curve does not truly begin to descend until age-3); therefore, the analysis will apply to only age-3 and older fish. The first step is to code each age, starting with zero for the youngest age considered fully recruited (i.e., age-3). 6.3.1

Preparing Data

The Box6_3.txt data file is read and observed below. Note that these data are so simple that they could have been entered directly into vectors in R as illustrated in Box 6.2. > ( d3
1 2 3 4 5

age catch 1 90 2 164 3 162 4 110 5 55 6

6 7 8 9 10

6 7 8 9 10

6.3.2

41 20 14 7 5 Chapman-Robson’s Method

The maximum-likelihood method for estimating the rate of survival proposed by Chapman and Robson (1960) and Robson and Chapman (1961) is implemented with chapmanRobson() from the FSA package. This function requires an R formula of the form catches~ages, where catches generically represents the vector of catch numbers and ages generically represents the vector of ages, as the first argument, the data frame from which those vectors are drawn as the second (or data=) argument and a vector of the fully recruited ages as the third (or ages2use=) argument. The ages of fully recruited fish can be identified with a full range (e.g., 3:10) or a concatenated list of ages (e.g., c(3,4,5,6,7,8,9,10)). The best estimates (with SEs) of the annual survival S and instantaneous mortality Z rates are extracted from the saved chapmanRobson object with summary(), the 95% confidence intervals for the two parameters are extracted with confint(), and a plot depicting the Chapman-Robson calculations is obtained with plot() (Note that the results shown here and those shown in the text differ slightly because more precision is used here on intermediate calculations). > cr1 summary(cr1) Estimate Std. Error S 57.9857579 1.57508209 Z 0.5442405 0.02468115 > confint(cr1) 95% LCI 95% UCI S 54.8986537 61.0728620 Z 0.4958664 0.5926147 > plot(cr1)

Catch

150

Z=0.544 S=58%

100 50 0 1 2 3 4 5 6 7 8 9

Age 0 1 2 3 4 5 6 7

Recoded Age

7

6.4

Mortality Rates from the Slope of Regression Line

The catch-at-age data shown in Box 6.3 and Figure 6.2 (in the text) is used again here. The catch-curve analysis is limited to those ages considered fully recruited to the gear (age-3 and older). At least five fish in the oldest age-class are present, so the mortality rate will apply to ages 3-10. Using least-squares regression, the slope of the line describing the relation between the natural log of number (y-variable) and age (x-variable) can be calculated longhand, by means of a spreadsheet, or with the R code below. 6.4.1

6.4.2.1 Unweighted Regression Linear regressions in R are performed with lm() where the first argument is a formula of the form y~x and the second (data=) argument is the data frame in which the variables can be found. An optional third (subset=) argument can be used to efficiently create a subset of a data frame to be used for that particular linear model. This argument is particularly important in catch-curve analyses because it can be used to limit the analysis to only those ages that appear to be fully recruited to the gear. In this example, the authors have determined that all fish age-3 and older are fully recruited and should be used to estimate the mortality rate. The ANOVA table is extracted from the saved lm object with anova(), the parameter estimates are extracted with summary(), and default 95% CIs for the parameters are extracted with confint(). > cc1 =3) > anova(cc1)

> confint(cc1) 2.5 % 97.5 % (Intercept) 6.3970827 6.9235800 age -0.5494179 -0.4730256 As noted in the box, the estimate of the instantaneous mortality rate (Z) is obtained from the estimated slope. The parameters are isolated from the saved lm object with coef(), and, because the slope is the second value in the returned vector it can be isolated by appending an [2]. The confidence interval for the slope is in the second row of the matrix returned by confint(); thus, the CI for the slope can be isolated by appending an [2,]. Note the use of the negative sign to convert the negative slope into a positive Z value. > ( Z
# 2nd coefficient of model results

The methods described above are implemented with catchCurve() from the FSA package. This function requires the same first three arguments as described for chapmanRobson() in Box 6.3. Note that the original, not logged, catches are given in this function. In addition, the weighted regression can be performed by including use.weights=TRUE. Specific information can be extracted from the results in the catchCurve() object as described for chapmanRobson() in Box 6.3.

Trap-netting of White Crappies (Pomoxis annularis) in a Midwestern reservoir in the spring of 2001 provided information on the standing age structure for the 281 fish collected representing six age-classes. Previous studies indicated that all ages were recruited to the trap nets, so the goal was to calculate instantaneous mortality between ages 1 and 6. The catch-at-age data clearly indicated that recruitment varied widely among years, and therefore one of the assumptions of catch-curve analysis was violated. It was assumed that the trap-net catches accurately indexed recruitment variability, and these data were used to create an index of year-class strength (li ) for each i year as li = rrLi , where ri = number of age-0 fish collected with trap nets in year i, and rL = lowest number of age-0 fish collected during the time series. The index was used to adjust the representation of each year-class Ni in spring 2001 to a constant recruitment as Nlii . 6.5.1

Preparing Data

The Box6_5.txt data file is read and the structure is observed below. The authors also added several variables to the original data frame. First, age is computed by subtracting the fish’s year.class from the capture year (2001). As suggested in the box, an index of year-class strength is created by dividing the annual capture of age-0 fish (i.e., age0) by the minimum annual capture of age-0 fish in all years (as found with min()). The catch of fish in each age-class is then adjusted by dividing the observed trap-net catch by the index of year-class strength. > d5 str(d5) 'data.frame': 6 obs. of 3 variables: $ year.class: int 2000 1999 1998 1997 1996 1995 $ catch : int 150 28 5 69 12 17 $ age0 : int 1665 556 111 2330 445 1220 > > > >

find age create year-class strength adjust catch for year-class strength now, what does the data frame look like

12

6.5.2

Fitting Catch-Curve Method

The table of the data (shown in the text and above) shows that all adjusted catches appear to be on the descending limb of the catch-curve and, thus, should be used in the regression to estimate the instantaneous mortality rate. The catch-curve model is fit with catchCurve() as described in BOX 6.4, but noting that leaving the third argument to catchCurve() blank tells R to use all ages in the analysis (These results are very slightly different from what is shown in Box 6.5 in the text. This is likely due to rounding but it is unclear if this is the reason as enough computational detail is not shown in Box 6.5 in the text). > cc1 summary(cc1) Estimate Std. Error t value Pr(>|t|) Z 0.3321564 0.03699358 8.978758 0.0008515291 A 28.2624898 NA NA NA > confint(cc1) 95% LCI 95% UCI Z 0.2294458 0.4348671 A 20.5025925 35.2649284 > plot(cc1)

Z=0.332 A=28.3%

log(Catch)

2.0 1.5 1.0 0.5 0.0 1

2

3

4

5

6

Age

6.5.3

Ogle Comment

It makes more sense to me to compute a so-called year-class correction factor by dividing the maximum observed catch by each of the individual catches-at-age (as found with max()). These values then represent how many times smaller that year-class is then the maximum observed year-class. If each catch is then multiplied by this value, it inflates the smaller year-classes “up to” the size of the largest year-class.

The catch-curve model is then fit exactly as above (but with the new adjusted catch). A comparison of these results with the results from above shows that it does not make any difference which “adjustment” method you use. In fact, “re-scaling” to any constant value – minimum catch, maximum catch, mean catch, or 100 – will result in the same estimated instantaneous mortality rate because the slope of the regression is invariant to linear transformations of the data (all of these “scales” only differ by a constant ratio). > cc2 summary(cc2) Estimate Std. Error t value Pr(>|t|) Z 0.3321564 0.03699358 8.978758 0.0008515291 A 28.2624898 NA NA NA As a final example of invariance property, examine the results below from scaling to the mean catch (as found with mean()). > > > >

Comparing instantaneous mortality rates (Z) for two or more populations is equivalent to comparing the slopes of the catch-curve regression lines. In the text are catch-at-age data for two populations that fully recruited to the gear at age-2. The R code to calculate and compare the slopes of the catch-curve regression lines is given below. 6.6.1

Preparing Data

The Box6_6.txt data file is read and the structure is observed below. The natural log of the catches, which is required for the catch curve regression, is appended to the data frame.

The method described in the box is the same as the ANCOVA discussed for Box 3.11 in the Chapter 3 Vignette and is fit with lm(). Also note that subset= argument is used to restrict the model to only age-2 and older fish (the authors note that fish age-2 and older are fully recruited to the gear). The type-I SS ANOVA table is extracted from the saved lm object with anova(), whereas the type-III and type-II SS ANOVA tables are extracted with Anova() (from the car package) with the appropriate type= argument. Because the interaction term is the last term in this model, all three types of SS provide the same p-value leading to the result that the interaction is insignificant. An insignificant interaction indicates that the slope does not differ between the groups. As the slope is directly related to the estimated instantaneous mortality rate (Z) this also suggests that there is no difference in Z between the two lakes. A plot of the fitted models to further illustrate this point is obtained with fitPlot() from the FSA package. > lm1 =2) > anova(lm1) Df Sum Sq Mean Sq F value Pr(>F) age 1 20.0825 20.0825 26.0612 0.0003414 lake 1 0.3946 0.3946 0.5120 0.4891677 age:lake 1 0.6598 0.6598 0.8563 0.3746383 Residuals 11 8.4765 0.7706 Total 14 29.6134 > Anova(lm1,type="III") Sum Sq Df F value Pr(>F) (Intercept) 101.361 1.00 131.5364 1.85e-07 age 21.113 1.00 27.3984 0.0002792 lake 0.263 1.00 0.3412 0.5708985 age:lake 0.660 1.00 0.8563 0.3746383 Residuals 8.477 11.00 Total 15.000 131.87 > Anova(lm1,type="II") Sum Sq Df F value Pr(>F) age 20.4650 1.000 26.5575 0.0003166 lake 0.3946 1.000 0.5120 0.4891677 age:lake 0.6598 1.000 0.8563 0.3746383 Residuals 8.4765 11.000 Total 14.0000 29.996 15

Spring electrofishing samples at 40 sites in Normandy Reservoir indicated that recruitment by Spotted Bass (Micropterus punctulatus) varied more than twofold among years Sammons and Bettoli (1998); therefore, analysis of cohort catch curves was employed. The catch from the 1992 cohort in annual samples taken between 1993 and 1998 are shown in the text. These and other data suggested that fish were not fully recruited to the gear until age-2.

The code below analyzes these data with catchCurve() as shown in Box 6.4. Note that the authors also note (correctly) that the last age should not be used in the catch curve analysis because of the very small sample size. > cc1 summary(cc1) Estimate Std. Error t value Pr(>|t|) Z 0.9914159 0.1433995 6.913662 0.02028661 A 62.8949035 NA NA NA > confint(cc1) 95% LCI 95% UCI Z 0.3744175 1.608414 A 31.2310244 79.979516 > plot(cc1)

4

Z=0.991 A=62.9%

log(Catch)

3 2 1 0 1

2

3

4

5

6

Age

6.8

Mortality Estimation with Length-Based Models

We use a Largemouth Bass (Micropterus salmoides) data set from Columbus Lake, Mississippi, to illustrate mortality computations from length-based models. The von Bertalanffy model parameters (K and L∞ ) were available from a parallel study in Columbus Lake and were K=0.226 and L∞ =636 mm (see Chapter 5 for calculations). All Largemouth Bass 150mm or longer were considered equally vulnerable to the collection gear (electrofishing); thus, Lx =150 mm. The mean and median length of fish 150 mm or longer in the data set were Lmean =260 mm and Lmedian =255 mm.

18

6.8.1

Ogle Comment

The raw data for the example in the box does not exist. Indeed enough information is given in that box to complete the calculations but most of that information in in summarized form. A reasonable approximation of the length data can be made from the results shown for the length frequency graph. The code here shows how I simulated those data. The age data that would be required to estimate L∞ and K cannot be simulated from the given information. The basic idea is to “expand” the counts of individuals in each of the 1-cm length bins to the value at the low end of the bin and then add a random “millimeter” component to simulate data recorded to millimeters. I will begin this process by entering the length bins (lower-value of the bin) and the frequency in the bins into two vectors (bins) and freqs). I then check the length of these vectors (i.e. number of numbers in the vector) to make sure that they at least match (I don’t trust myself!) > bins freqs length(bins) [1] 44 > length(freqs) [1] 44 A vector of the “floor” measurement for each fish (i.e., the lowest whole cm) is created by repeating each value in the bins vector the number of times shown in the freqs vector. These repetitions are constructed with rep(). A table of these values is then created to see if they match the summary information in the box. As they did, I then multiple the values by 10 to convert the cm to mm. > len.cm table(len.cm) len.cm 9 10 5 39 29 30 44 40 49 50 6 3

11 43 31 37 51 3

12 55 32 31 52 4

13 64 33 36

14 15 86 106 34 35 15 19

16 99 36 18

17 82 37 13

18 81 38 8

19 56 39 20

20 45 40 19

21 27 41 9

22 36 42 12

23 43 43 9

24 52 44 11

25 65 45 13

26 73 46 13

27 63 47 4

28 42 48 10

> len.mm set.seed(2101) The sample() function is then used to construct as many random integers from between 0 and 9 (first argument) as there are values in the len.mm vector (note that sampling from 0:9 must be done with replacement; i.e., use of replace=TRUE). and then added to the len.mm vector,

Finally, these simulated data were written out to a text file for use below as if the data had been entered and read from an external data file and not simulated in this manner. > write.table(data.frame(len=len.mm),"Box6_8.txt",quote=FALSE,row.names=FALSE,col.names=TRUE)

6.8.2

Preparing Data

The Box6_8.txt data file is read and the structure is observed below. Note that the authors restricted their analysis to fish 150-mm and larger because those fish were fully recruited to the gear. A new data frame with just these fish is constructed with Subset() where the first argument is the original data frame name and the second argument is a conditioning statement for the subset. 20

The authors illustrate the use of equation 6.8 to estimate Z. This method requires knowledge of L∞ and K from the von Bertalanffy growth model (see Box 5.4 in the Chapter 5 vignette for how to fit a von Bertalanffy model to length-at-age data). In this box, the given summary information is stored into two objects and the mean (using mean()) and minimum (using min()) lengths are found and stored into two objects. Thus, the instantaneous mortality (Z) using equation 6.8 is estimated in the last line below. > Linf K ( Lmean ( Lmin ( Z1
Hoenig Method for Estimating Z from Median Length

Hoenig (1983) modified Beverton and Holt’s method to produce equation 6.9 in the text. This method still requires L∞ , K, and Lminimum but it also requires the median length (as found with median(). The instantaneous mortality (Z) using equation 6.9 is estimated in the last line below using two intermediate calculations in the previous two lines. > ( Lmedian Ymedian Ymin ( Z2
6.8.5

Estimating Z from Length-Converted Catch Curve

Estimating Z from a length-converted catch curve as described by Pauly (1984) requires finding the midpoint of length bins and the number of fish in each of those bins. In essence, one needs to know the basic calculations for constructing a length-frequency histogram. In R, histograms are constructed with hist(). This function only requires a vector of values to construct the histogram as the first argument. However, you can control the bins used by the histogram algorithm by sending break points for the bins to the breaks= argument. In addition, hist() defaults to the bins being right-inclusive – i.e., a value of 10 would be included in the 9-10 bin rather than the 10-11 bin – whereas most fisheries biologists are used to using left-inclusive bins. Left-inclusive bins can be used by including the right=FALSE argument to hist(). In the example below, left-inclusive bins that start at 150-mm, end at 530-mm, and are 10-mm wide were created. The histogram was then constructed, but it was also saved to an object (h). The midpoint values and the counts in each bin are extracted by appending $mids and $counts, respectively, to the saved hist object, as illustrated below. > bins h
100

The authors (on page 249) provide three methods for estimating L∞ and K if length-at-age data do not exist. These methods are illustrated here. 6.8.6.1 Three Largest Fish Method Estimate of L∞ Finding the mean lengths of the three largest fish in the length vector is a bit of work, which is best shown in several steps – (1) order the vector positions from smallest to largest fish, (2) find the positions of three largest fish, (3) find the lengths of those three fish, and (4) find the mean of those lengths. > ord.len ord.top3 ( len.top3 ( Lmean.top3
23

A 5-year tagging program was completed to monitor mortality (as well as population size and recruitment which are not shown in this example) of Largemouth Bass (Micropterus salmoides) in Lake Travesty. Fish were marked and recaptured annually during a 2-week collection period in spring each year, and results were analyzed with the Jolly-Seber Method. The five year-history of marking and recaptures (preadjusted for tag loss) are shown in the table in the box in the text. 6.9.1

Ogle Comment

The Jolly-Seber method is implemented with mrOpen() from the FSA package. (The mrOpen() function and the Jolly-Seber method are discussed in much detail in Chapter 8 of the Introductory Fisheries Analysis with R vignettes. The presentation below will assume that you have read that vignette). The biggest differences between the use of mrOpen() and what was described in the box is the use of Seber’s modified formulas (see bottom of page 253 in AIFFD), the allowance for possible accidental deaths during the sampling process in mrOpen(), the transposition of the summary table shown in Table 6.2 of the chapter, and the use of different terminology. The following table shows the equivalencies in terminology between mrOpen() and the box. AIFFD

mrOpen()

Meaning

mi r·i – rii – ri· ki Bi∗

ni mi ui mji Ri ri zi Mi

Number of fish captured in the ith sample Number of marked fish recaptured in the ith sample. Number of UNmarked fish captured in the ith sample. Number of marked fish in the ith sample last caught in the jth sample. Number of marked fish returned to the population after the ith sample. Number of the fish released in the ith sample that are subsequently recaptured. Number of fish captured before the ith sample, not captured in the ith sample, but captured subsequ Estimated number of marked fish in the population just prior to the ith sample.

6.9.2

Preparing Data

The summarized catch data is provided in the box. These results are entered into two matrices below. For example, the rii portion of the table on page 255 in the book is entered below. Note that rep() is used to repeat the first argument by the number of times in the second argument and rbind() is used to “bind” together multiple vectors of the same length in a row-wise manner (i.e., each vector is a row in the resulting matrix). Also note that the matrix has been entered as a square 5x5 matrix where the last column, not shown in the book table, containing all blanks is needed (i.e., this column is all blanks because the last sample is such that the fish released cannot be subsequently recaptured). As noted above, this portion of the table is a transposition of the “top” portion of the “Method B” table required by mrOpen(). In other words, the rows of this table should be the columns of the required table and vice versa. Fortunately, the entire matrix can be easily transposed with t().

The “bottom” portion of the “Method B” table required by mrOpen() is constructed from some of the marginal values of the table shown in the text. However, one must be very careful to note the different definitions as outlined in the table above. Also note that the book table does not show what the sample size was in the last sample. Thus, the only item known from the last sample is the number of observed marked (i.e., recaptured) fish. Fortunately, this information is not required in the Jolly-Seber calculations. However, mrOpen() requires non-negative values in the entire matrix which is accomplished below by entering m for n for the last sample. This is purely a work-around for dealing with the missing information from the table in the box and the requirements of mrOpen(). > > > > >

# m_i_ from book # r_.i_ from book # assumes no accidental deaths, thus m_i_ from book

Performing Jolly-Seber Calculations

The Jolly-Seber calculations are computed in R by submitting the top and bottom portions of the Method B table as the first two arguments to mrOpen() and submitting the return object to summary(). If verbose=TRUE is used then the complete set of “observables” will be printed first. The first three columns of this output is simply repeated from the bottom portion of the Method B table. The last two columns are computed from the top portion of the Method B table and correspond to marginal columns of the table shown in the box (but make sure to note the different terminology). 26

Recommend Documents

The authors fit a power function to the maximum consumption versus weight variables for the 22.4 and ... The linear model for the 6.9 group is then fit with lm() using a formula of the form ..... PhD thesis, University of Maryland, College Park. 10.

Some sections build on descriptions from previous sections, so each ... setwd("c:/aaaWork/web/fishR/BookVignettes/AIFFD/") ... fact is best illustrated with a two-way frequency table constructed from the two group factor variables with ..... 10. Year

May 13, 2015 - The following additional packages are required to complete all of the examples (with ... R must be set to where these files are located on your computer. ...... If older or younger age-classes are not well represented in the ... as the

Mar 8, 2018 - These things are based on the sampling distribution of the estimators (ËÎ²) if the model is true and we don't do any model selection. â¢ What if we do model selection, use Kernels, think the model is wrong? â¢ None of those formulas

Jan 23, 2017 - 1. What are all these things? 2. What is the mean of yi? 3. What is the distribution of Ïµi? 4. What is the notation X or Y ? Drawing a sample yi = xi Î² + Ïµi. Write code which draws a sample form the population given by this model. p

The mathematics: A kernel is any function K such that for any u, K(u) â¥ 0, â« duK(u)=1 and â« uK(u)du = 0. â¢ The idea: a kernel is a nice way to take weighted averages. The kernel function gives the .... The âbig-Ohâ notation means we have

N(0, 1). The CLT tells us about the shape of the âpilingâ, when appropriately normalized. Evaluation. Once I choose some way to âlearnâ a statistical model, I need to decide if I'm doing a good job. How do I decide if I'm doing anything good?

Jan 30, 2018 - More intuitively, this notation means that the remainder (all the higher order terms) are about the size of the distance between ... We don't know Âµ, so we try to use the data (the Zi's) to estimate it. â¢ I propose 3 ... Asymptotica

when a lot of features are irrelevant and drown out the relevant features' signal in the distance calculations. Notice that the nearest-neighbor method can easily be applied to regression problems with a real-valued target variable. In fact, the meth

referee has made changes in the rules and/or tables, simply make a note of the changes in pencil (you never kno, ,hen the rules ,ill ... the Game Host's rulebook until they take on the mantle of GH. The excitement and mystery of ...... onto the chara

The Worthington Pottery Company manufactures beer mugs in batches of 120. and the overall rate of defects is 5%. Find the probability of having more than 6. defects in a batch. 8. A bank's loan officer rates applicants for credit. The ratings are nor

The Prerequisite for connecting a Java application to MySQL is adding MySQL. JDBC driver in the Project/Program. The NetBeans IDE comes with pre-bundled MySQL JDBC Driver. You may add. JDBC Driver in the Database Connectivity Project as follows-. Pag