This function calculates the m-array for multistate capture-recapture data, the number of released and never seen again individuals.

multimarray(X, freq)

Arguments

X

a matrix of encounter histories over K occasions

freq

is a vector with the number of individuals having the corresponding encounter history

Value

This function returns a matrix in which R the number of released individuals is in the first column, the number of individuals never recaptured (K-1) is in the last column and m the m-array (K-1 x K-1) with upper triangle filled only is in sandwich between these two vectors.

Author

Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>,Jean-Dominique Lebreton, Rémi Choquet, Roger Pradel

Examples

# Read in Geese dataset: geese = system.file("extdata", "geese.inp", package = "R2ucare") geese = read_inp(geese) # Get encounter histories and number of individuals with corresponding histories geese.hist = geese$encounter_histories geese.freq = geese$sample_size # build m-array multimarray(geese.hist, geese.freq)
#> released #> [1,] 785 239 53 0 36 18 0 13 6 0 6 5 1 5 2 0 #> [2,] 2086 85 615 6 36 158 2 22 92 3 7 32 2 3 22 0 #> [3,] 623 24 49 67 11 30 18 3 10 10 0 8 3 2 5 3 #> [4,] 2082 0 0 0 491 134 0 149 71 3 51 42 3 21 13 0 #> [5,] 3918 0 0 0 159 869 15 63 335 10 41 164 3 18 74 2 #> [6,] 1098 0 0 0 14 101 158 8 47 48 7 16 18 1 14 11 #> [7,] 2666 0 0 0 0 0 0 564 200 8 150 116 5 52 46 2 #> [8,] 4026 0 0 0 0 0 0 125 1017 36 53 325 14 29 146 6 #> [9,] 911 0 0 0 0 0 0 7 45 178 11 27 39 1 21 26 #> [10,] 1952 0 0 0 0 0 0 0 0 0 404 175 5 121 58 0 #> [11,] 3507 0 0 0 0 0 0 0 0 0 132 843 42 64 264 14 #> [12,] 1345 0 0 0 0 0 0 0 0 0 19 89 196 12 70 99 #> [13,] 1291 0 0 0 0 0 0 0 0 0 0 0 0 271 99 2 #> [14,] 2887 0 0 0 0 0 0 0 0 0 0 0 0 137 654 18 #> [15,] 992 0 0 0 0 0 0 0 0 0 0 0 0 18 105 168 #> never #> [1,] 401 #> [2,] 1001 #> [3,] 380 #> [4,] 1104 #> [5,] 2165 #> [6,] 655 #> [7,] 1523 #> [8,] 2275 #> [9,] 556 #> [10,] 1189 #> [11,] 2148 #> [12,] 860 #> [13,] 919 #> [14,] 2078 #> [15,] 701