SlideShare a Scribd company logo
1 of 59
Download to read offline
Background                        Model definitions                            Tools                             Tests




                  Estimating demographic parameters from
                      samples of unmarked individuals

                                              Ben Bolker

             Departments of Mathematics & Statistics and Biology, McMaster University


                                            8 March 2011




Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests




Outline
       1 Background
               Ecological/statistical motivations
               Study system
       2 Model definitions
       3 Tools
               State-space models
               Markov chain Monte Carlo
               Gibbs/block sampling
       4 Tests
               Perfect observation, trivial dynamics
               Perfect observation, non-trivial dynamics
               Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                           Model definitions                            Tools                             Tests



Ecological/statistical motivations


Cryptic density-dependence



                                                                          Environmental variation
                                                                          + correlated variation in
                                                                          density . . .
                                                                          = cryptic
                                                                          density-dependence
                                                                          best possible estimates of
                                                                          demographic parameters?
   (Wilson & Osenberg 2002, Shima &
   Osenberg 2003)
Ben Bolker                                      Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                           Model definitions                            Tools                             Tests



Ecological/statistical motivations


Data


                Repeated samples of individual animals
                . . . Multiple times, observers, locations
                Presence and size (imperfect)
                Estimate demographic parameters:
                        birth/immigration
                        death/emigration
                        change (growth)
                . . . as a function of size, (population density)



Ben Bolker                                      Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                           Model definitions                            Tools                             Tests



Ecological/statistical motivations


Data


                Repeated samples of individual animals
                . . . Multiple times, observers, locations
                Presence and size (imperfect)
                Estimate demographic parameters:
                        birth/immigration
                        death/emigration
                        change (growth)
                . . . as a function of size, (population density)



Ben Bolker                                      Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                            Model definitions                            Tools                             Tests



Study system


Natural history


                                                                    Thalassoma hardwicke
                                                                    (sixbar wrasse)
                                                                    Settlement: ≈ 5–10 mm
                                                                    Growth: a few mm per month
                                                                    Death: by predator
                                                                    (competition for refuges)
                                                                    Immigration/emigration:
   photo: Leonard Low, Flickr via species.wikimedia.org             rare below 40–50 mm



Ben Bolker                                       Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Study system


Where they live




                                                                          Patch reefs, French
                                                                          Polynesia (and
                                                                          throughout the south
                                                                          Pacific)




Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                         Model definitions                            Tools                             Tests



Study system


What they look like to me


                                  80
       Estimated fish size (mm)




                                  60



                                  40



                                  20




                                       Feb   Mar            Apr              May        Jun            Jul

                                                                      Date


Ben Bolker                                                    Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Study system

40
What they look like to me




 20




                           Feb                              Mar                                       Apr
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Study system


Outline
       1 Background
               Ecological/statistical motivations
               Study system
       2 Model definitions
       3 Tools
               State-space models
               Markov chain Monte Carlo
               Gibbs/block sampling
       4 Tests
               Perfect observation, trivial dynamics
               Perfect observation, non-trivial dynamics
               Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests




Outline
       1 Background
               Ecological/statistical motivations
               Study system
       2 Model definitions
       3 Tools
               State-space models
               Markov chain Monte Carlo
               Gibbs/block sampling
       4 Tests
               Perfect observation, trivial dynamics
               Perfect observation, non-trivial dynamics
               Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                            Model definitions                            Tools                             Tests




Demographic parameters as f (size)
                                  Growth            Appearance             Persistence
                       1.0



                       0.8



                       0.6
         Probability
          (per day)
                       0.4

                                                 a.settle
                             l.grow              b.settle              a.mort
                       0.2                      tot.settle             c.mort


                       0.0
                             1020304050607080 1020304050607080 1020304050607080
                                               Fish size (mm)

Ben Bolker                                       Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                              Tools                             Tests




Observation model

                               Detection                    Measurement
                              (probability)              (standard deviation)

                   0.8
                                                   3.5


                   0.6                             3.0

                                                   2.5                              Measurement error
                                                                                    Double−count
                   0.4                                                              Zero−count
                                                   2.0

                                                   1.5
                   0.2
                                                   1.0


                         10 20 30 40 50 60 70 80         10 20 30 40 50 60 70 80
                                        Fish size (mm)
Ben Bolker                                           Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests




Outline
       1 Background
               Ecological/statistical motivations
               Study system
       2 Model definitions
       3 Tools
               State-space models
               Markov chain Monte Carlo
               Gibbs/block sampling
       4 Tests
               Perfect observation, trivial dynamics
               Perfect observation, non-trivial dynamics
               Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



State-space models


State-space models



               Problem: estimating parameters of systems with un- or
               imperfectly-observed states?
               Easy if no feedback (measurement error models)
               With feedback (dynamic models), brute force approaches
               become infeasible . . .




Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                         Model definitions                            Tools                             Tests



State-space models


Directed acyclic graph (DAG)



                                             parameters




                      N1          N2                  N3            N4                 N5



                     obs1         obs2           obs3             obs4             obs5




Ben Bolker                                    Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                 Model definitions                                   Tools                          Tests



Markov chain Monte Carlo


Bayesian statistics, in 30 seconds

               computational (convenience) Bayesian statistics
               (forget all that stuff about philosophy of statistics, subjectivity, incorporating prior information . . . )

               have a likelihood, L(θ) = Prob(data|θ)
               want a posterior probability, Ppost (θ) = Prob(θ|data)
               Bayes’ rule:

                                                                      L(θ) · prior(θ)
                                       Ppost (θ) =
                                                                      L(θ ) · prior(θ ) dθ

               may want mean, mode, confidence intervals, . . . denominator
               very high-dimensional

Ben Bolker                                              Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo


                                   θA
        Posterior probability




                                                                   MCMC rule:
                                                                                  P(θ A )   J(θ B → θ A )
                                                                             if           =
                                                                                  P(θ B )   J(θ A → θ B )

                                                                   then stationary distribution =
                                                                   posterior probability
                                                                   (provided chain is irreducible etc.)
                                Parameter value




Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo


                                   θA
        Posterior probability




                                                                   MCMC rule:
                                                                                  P(θ A )   J(θ B → θ A )
                                                                             if           =
                                                                                  P(θ B )   J(θ A → θ B )

                                                                   then stationary distribution =
                                                                   posterior probability
                                    q   q
                                                                   (provided chain is irreducible etc.)
                                Parameter value




Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                               Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo


                                   θA
        Posterior probability




                                                                    MCMC rule:
                                                                                   P(θ A )   J(θ B → θ A )
                                                                              if           =
                                                                                   P(θ B )   J(θ A → θ B )

                                                                    then stationary distribution =
                                                                    posterior probability
                                    q   qq
                                                                    (provided chain is irreducible etc.)
                                Parameter value




Ben Bolker                                          Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo



                                   θA
        Posterior probability




                                                                     MCMC rule:
                                                                                    P(θ A )   J(θ B → θ A )
                                                                               if           =
                                                                                    P(θ B )   J(θ A → θ B )

                                                                     then stationary distribution =
                                                                     posterior probability
                                                                     (provided chain is irreducible etc.)
                                    q   qqq


                                Parameter value



Ben Bolker                                           Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                    Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo



                                      θA
        Posterior probability




                                                                         MCMC rule:
                                                                                        P(θ A )   J(θ B → θ A )
                                                                                   if           =
                                                                                        P(θ B )   J(θ A → θ B )

                                                                         then stationary distribution =
                                                                         posterior probability
                                                                         (provided chain is irreducible etc.)
                                q q q qq
                                   q    q   qqq


                                Parameter value



Ben Bolker                                               Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo



                                   θA
        Posterior probability




                                                                   MCMC rule:
                                                                                  P(θ A )   J(θ B → θ A )
                                                                             if           =
                                                                                  P(θ B )   J(θ A → θ B )

                                                                   then stationary distribution =
                                                                   posterior probability
                                                                   (provided chain is irreducible etc.)

                                Parameter value



Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Markov chain Monte Carlo



                                   θA
        Posterior probability




                                                                   MCMC rule:
                                                                                  P(θ A )   J(θ B → θ A )
                                                                             if           =
                                                                                  P(θ B )   J(θ A → θ B )
                                        θB
                                                                   then stationary distribution =
                                                                   posterior probability
                                                                   (provided chain is irreducible etc.)

                                Parameter value



Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                      Model definitions                            Tools                             Tests



Markov chain Monte Carlo


Metropolis-(Hastings) updating



                                        θA
        Posterior probability




                                                                         Metropolis rule:

                                                                             accept B with probability
                                                                                           P(θ B )
                                                                              min 1,
                                                                                           P(θ A )

                                                                         satisfies MCMC rule . . . Don’t
                                                                         need to know denominator!
                                Candidate distribution
                                  Parameter value



Ben Bolker                                                 Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                          Model definitions                            Tools                             Tests



Gibbs/block sampling


Gibbs sampling

                                                                                       Joint distribution of
                                                                                       parameters often difficult
                                                                                       Condition each element
                                                                                       on “known” (i.e. imputed)
                                                                                       values of all other
                                                                                       elements: P(a, b, c) =
                                                                                       P(a|b, c)P(b, c)
         0.5

         1
                                                                                       Gibbs sampling: do this
                                                          5
                                                       2.




         1.5
                   2

                                                                                       repeatedly for each
                                                         5
                                                       1.




         2.5
               3


                                                                                       element, or block of
                                                         5
                                                       0.




         3.5
                            4.5

         4                              3
                        4         3.5       2
                                                                                       elements
                                                1




Ben Bolker                                                     Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                                 Model definitions                                       Tools                             Tests



Gibbs/block sampling


Gibbs sampling

                                                                                                         Joint distribution of
                                                                                                         parameters often difficult
                                                                          q
                                                                                                         Condition each element
                                                                          q       q

                                                                             q
                                                                                   q
                                                                                                         on “known” (i.e. imputed)
                                                                          q
                                                                          q
                                                                        q q
                                                                           q

                                                                            q
                                                                                                         values of all other
                                                   q                      q       q
                                                             q q
                                                              q
                                                                         qq                              elements: P(a, b, c) =
                                                   q   q
                                                                         q
                                                                                                         P(a|b, c)P(b, c)
             0.5                                             q

             1
                                                                                                         Gibbs sampling: do this
                                                                    5
                                                                 2.




                                                   q
             1.5
                       2

                                                                                                         repeatedly for each
                                                                   5
                                                                 1.




             2.5
                   3


                                                                                                         element, or block of
                                                                   5
                                                                 0.




             3.5
                               4.5

             4                             3
                           4         3.5       2
                                                                                                         elements
                                                       1




Ben Bolker                                                                       Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                             Model definitions                                         Tools                             Tests



Gibbs/block sampling


Gibbs sampling

                                                                                                       Joint distribution of
                                                                                                       parameters often difficult
                                                                        q
                                                                                                       Condition each element
                                                                        q        q

                                                                           q
                                                                                  q
                                                                                                       on “known” (i.e. imputed)
                                                                        q
                                                                        q
                                                                      q q
                                                                         q

                                                                          q
                                                                                                       values of all other
                                                   q                    q        q
                                                           q q
                                                            q
                                                                       qq                              elements: P(a, b, c) =
                                                   q   q
                                                                       q
                                                                                                       P(a|b, c)P(b, c)
             0.5                                           q

             1
                                                                                                       Gibbs sampling: do this
                                                                  5
                                                               2.




                                                   q
             1.5
                       2

                                                                                                       repeatedly for each
                                                                 5
                                                               1.




             2.5
                   3


                                                                                                       element, or block of
                                                                 5
                                                               0.




             3.5
                               4.5

             4                             3
                           4         3.5       2
                                                                                                       elements
                                                       1




Ben Bolker                                                                     Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                         Model definitions                            Tools                             Tests



Gibbs/block sampling


Back to the DAG



                                             parameters




                       N1         N2                  N3            N4                 N5



                       obs1       obs2           obs3             obs4             obs5




Ben Bolker                                    Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests




Outline
       1 Background
               Ecological/statistical motivations
               Study system
       2 Model definitions
       3 Tools
               State-space models
               Markov chain Monte Carlo
               Gibbs/block sampling
       4 Tests
               Perfect observation, trivial dynamics
               Perfect observation, non-trivial dynamics
               Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Perfect observation, trivial dynamics


Outline
        1 Background
                Ecological/statistical motivations
                Study system
        2 Model definitions
        3 Tools
                State-space models
                Markov chain Monte Carlo
                Gibbs/block sampling
        4 Tests
                Perfect observation, trivial dynamics
                Perfect observation, non-trivial dynamics
                Imperfect observation
Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Perfect observation, trivial dynamics


DAG



               parameters                      fates


                                                                 Demographic parameters|fates:
                                                                 standard M-H
                                                                 Fates|parameters
                     N1                         N2




Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                              Tools                             Tests



Perfect observation, trivial dynamics


Scenario




                                                                     One fish of the same size observed
                        Lsurv = (1 − m)(1 − p)   S                   on two consecutive days . . .
                                                                     was it the same individual?
                                                                                                   (1 − m)(1 − p)
                                                                        P(surv|m, p) =
                                                                                                  1 − m − p + 2mp
                            X
                         Lmort = mp(1 − p)S−1




Ben Bolker                                           Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, trivial dynamics


Updating probabilities for parameters

                                  mortality (m)


                       1.5                                             If the fish survived, then our
                       1.0                                             posterior probabilities for the
                       0.5                                             parameters are:
                                                     type
         probability
                               immigration (p)          prior
                                                                               m ∼ Beta(1, 2)
          density
                       6
                                                        posterior              (0 mortalities, 1 survival)
                       5
                       4                                                       p ∼ Beta(1, S + 1)
                       3
                       2
                                                                               (0 immigrations, S
                       1                                                       non-immigrations)
                       0
                              0.2 0.4 0.6 0.8
                               probability


Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                 Model definitions                               Tools                            Tests



Perfect observation, trivial dynamics


Trivial example: results

                                          mortality (m)                               immigration (p)




                       4


                                        2(m + S(1 − m))
                       3                                                              Beta(p,1,S)
                                             S+1
             density
                       2



                       1



                       0
                           0.0     0.2     0.4    0.6      0.8     1.0   0.0    0.2     0.4       0.6   0.8   1.0
                                                                  value
Ben Bolker                                              Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Perfect observation, trivial dynamics




                P(mortality & no immigration) ≈ 0.16 = 1/(S + 1);
                P(survival & immigration) ≈ 0.83 = S/(S + 1);
                results are simple and make sense; closed form solution is
                possible but ugly . . .
                combination of observations and non-observation of other
                individuals provides information (could fail with non-detection)




Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


Outline
       1 Background
                Ecological/statistical motivations
                Study system
       2 Model definitions
       3 Tools
                State-space models
                Markov chain Monte Carlo
                Gibbs/block sampling
       4 Tests
                Perfect observation, trivial dynamics
                Perfect observation, non-trivial dynamics
                Imperfect observation
Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


Non-trivial dynamics




               Multiple individuals, measured over multiple days
               Still simple: no density-dependent rates,
               immigration/emigration of large individuals
               observations still error-free




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


Parameter/fate sampling



                                  parameters                                   Parameter sampling: M-H
                                                                               updating with simple
                      fates(1,2)               fates(2,3)
                                                                               candidate distributions
                                                                               Fate sampling: ???
                                                                                       Enumerating
                       N1             N2              N3                               possibilities is tedious
                                                                                       ...




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                     6 mm                                      7 mm                       dead
           5 mm               G (5) · (1 − M(5))                                  X                       M(5)
           6 mm            (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
           absent                     I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                     6 mm                                      7 mm                       dead
           5 mm               G (5) · (1 − M(5))                                  X                       M(5)
           6 mm            (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
           absent                     I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                     6 mm                                      7 mm                       dead
          5 mm                G (5) · (1 − M(5))                                  X                       M(5)
          6 mm             (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
          absent                      I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                     6 mm                                      7 mm                       dead
           5 mm               G (5) · (1 − M(5))                                  X                       M(5)
           6 mm            (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
           absent                     I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                    6 mm                                      7 mm                       dead
         5 mm                G (5) · (1 − M(5))                                  X                       M(5)
         6 mm             (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
         absent                      I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


M-H fate sampling




                                     6 mm                                      7 mm                       dead
           5 mm               G (5) · (1 − M(5))                                  X                       M(5)
           6 mm            (1 − G (6)) · (1 − M(6))                     G (6) · (1 − M(6))                M(6)
           absent                     I (6)                                     I (7)                      X




Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                                   Tools                       Tests



Perfect observation, non-trivial dynamics


Sampling test

                6 survives



                both grow


                                                                                                       w
                  5 grows                                                                                  Sampling
         Fate                                                                                              True
                                                                                                           Gibbs
                  6 grows



                  both die


                                   10−3.5    10−3    10−2.5    10−2   10−1.5   10−1   10−0.5
                                                    Probability

Ben Bolker                                              Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


Testbed


               Simulate for 80 days, with a settlement rate (tot.settle) of
               5% day:
               29 distinct individuals, size range 5–30, total of 618 fish-days
               (observations).
               Sample fates only (1000 MCMC steps), fixed demographic
               parameters
       Sampled 1000 unique fates (but only 895 unique likelihoods)



Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


Testbed


               Simulate for 80 days, with a settlement rate (tot.settle) of
               5% day:
               29 distinct individuals, size range 5–30, total of 618 fish-days
               (observations).
               Sample fates only (1000 MCMC steps), fixed demographic
               parameters
       Sampled 1000 unique fates (but only 895 unique likelihoods)



Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                            Tools                             Tests



Perfect observation, non-trivial dynamics


True demography30
               25
               20
        size

               15
               10
               5




                     0                20                 40              60               80

                                                        day

Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                             Tools                            Tests



Perfect observation, non-trivial dynamics


Fate-only results


                        0.05
                        0.04

        Density 0.03
                        0.02
                        0.01
                        0.00                                                         q


                                  −520               −500        −480                     −460
                                                      Log−likelihood
Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                             Tools                            Tests



Perfect observation, non-trivial dynamics


Sampling fates, parameters, both . . .

                    0.25



                    0.20



                    0.15                                                                 type
                                                                                            fate only
         Density                                                                            parameters only
                    0.10                                                                    both


                    0.05



                    0.00
                           −500       −490        −480         −470    −460       −450
                                              Log−likelihood

Ben Bolker                                             Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                  Model definitions                                 Tools                         Tests



Perfect observation, non-trivial dynamics


Parameter estimates 1
                                  lgrow                            a.mort                            c.mort
                                                                                     140
                    3.0                               0.8                            120
                    2.5                                                              100
                    2.0                               0.6
                                                                                      80
                    1.5                               0.4                             60
                    1.0                                                               40
                                                      0.2
                    0.5                                                               20

                          −1.9 −1.7 −1.5 −1.3
                            −1.8 −1.6 −1.4 −1.2             −4.0 −3.5 −3.0 −2.5           0.010.015.020.025.030
                                                                                              0 0 0 0
         density                 a.settle                          b.settle                       tot.settle
                    0.7                                                              50
                    0.6                               0.5
                                                                                     40
                    0.5                               0.4
                    0.4                               0.3                            30
                    0.3                                                              20
                                                      0.2
                    0.2
                    0.1                               0.1                            10

                             11    12       13   14          1.01.52.02.53.03.54.0           0.020.030.040.050.06



Ben Bolker                                              Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                           Model definitions                                                                      Tools                                  Tests



Perfect observation, non-trivial dynamics


Parameter estimates 2
                                           Growth                                               Appearance                                        Persistence
                         1.0                                      q      q    q                 q                                   1.00      q                qqqqqqqqqqqqqqqq



                                                                                     0.08                            a.settle

                         0.8                                                                                         b.settle 0.98
                                                                                                                                                       q
                                                                                                                                                        q q
                                                                                                       q
                                                                                     0.06                           tot.settle
                                                                                                                                                   q
                         0.6                                                                       q    q
                                                                                                                                                               q
                                                                                                                                    0.96
         Probability                                                                                                                                   q

          (per day)                                                                  0.04                  q                                                        a.mort
                                                                                                                                                           q
                         0.4                                  l.grow
                                                         q
                                                              q      q       q                                                      0.94                            c.mort
                                                      q                                                     q
                                           q      q
                                   q                         q            q                                                                        q
                                                                                     0.02
                         0.2          q
                                       q
                                               qqq
                                                     q

                                  q           q                       q                        q
                                                          q
                                          q                      q                                                                  0.92

                         0.0                                                     q   0.00           q          qqqqqqqqqqqqqqqqqq              q



                               0 5 10 15 20 25 30                                            0 5 10 15 20 25 30                            0 5 10 15 20 25 30
                                                                                            Fish size (mm)

Ben Bolker                                                                           Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                                            Model definitions                                                Tools                               Tests



Perfect observation, non-trivial dynamics


Parameter estimates 3
                              a.mort                                         a.settle                                         b.settle
          −2.0                                            16                                               4.0                                        q


                                                          15                                               3.5
                                                                                                                                      q
          −2.5    q
                                          q
                                                      q   14                                               3.0                q
                                                                                                                                              q
                                                  q
                                                          13
                                                                 q
                                                                     q                                     2.5
          −3.0            q                                                                                       q
                                                                                                                                  q
                                                                                                                                                  q
                              q               q                          q   q                             2.0                            q
                      q               q                   12                      q   q                               q   q

          −3.5                    q                                                       q   q   q        1.5
                                                          11
                                                                                                           1.0
          −4.0                                            10                                          q


                              c.mort                                             lgrow                                        tot.settle
                                                          −1.2                                            0.045
          0.030                           q                                                               0.040
          0.025                                                                           q
                                                                                                          0.035
                                                          −1.4                                        q                                           q
          0.020               q
                                                  q
                                                                             q
                                                                                              q   q       0.030                           q
                                                                                                                                              q
                                  q
          0.015   q                                       −1.6   q
                                                                     q
                                                                                  q                       0.025               q   q
                                                                                                                                                      q

                                                                                                                                      q
          0.010                                                                       q
                                                                                                          0.020       q   q
                      q                       q
                                                          −1.8                                            0.015   q
          0.005           q
                                                                         q
                                      q
                                                      q
                                                                                                          0.010




Ben Bolker                                                           Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Imperfect observation


Outline
       1 Background
                Ecological/statistical motivations
                Study system
       2 Model definitions
       3 Tools
                State-space models
                Markov chain Monte Carlo
                Gibbs/block sampling
       4 Tests
                Perfect observation, trivial dynamics
                Perfect observation, non-trivial dynamics
                Imperfect observation
Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                              Model definitions                            Tools                             Tests



Imperfect observation


Adding errors


                                  parameters


                        fates(1,2)          fates(2,3)
                                                                   Back to the more typical
                        N1           N2           N3               graph: incorporate information
                                                                   from N(t − 1), N(t + 1), and
                                                                   current observation
                        obs1         obs2        obs3


                               obs parameters


Ben Bolker                                         Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Imperfect observation


New algorithm


       For each individual:
               Pick true state at N(t), from all possible states, conditioning
               on N(t − 1)
               Pick identity at time N(t + 1) from feasible set:
               update probabilities
               Pick corresponding observation from observed(t):
               update probabilities
               Calculate likelihood, M-H update



Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                         Model definitions                            Tools                             Tests



Imperfect observation


Open questions, caveats



               Will it work ??
               Add complexities:
                        Multiple populations
                        Spatial variation, correlation among parameters
               Simplify/generalize code
               Speed?




Ben Bolker                                    Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals
Background                        Model definitions                            Tools                             Tests



Imperfect observation


Conclusions & musings



               MCMC as powerful technology
               . . . can it be democratized?
               Data limitations shift over time:
               hierarchical models are great for “modern” (high-volume,
               low-quality) data




Ben Bolker                                   Departments of Mathematics & Statistics and Biology, McMaster University
Estimating unmarked individuals

More Related Content

More from Ben Bolker

Ecological synthesis across scales: West Nile virus in individuals and commun...
Ecological synthesis across scales: West Nile virus in individuals and commun...Ecological synthesis across scales: West Nile virus in individuals and commun...
Ecological synthesis across scales: West Nile virus in individuals and commun...Ben Bolker
 
evolution of virulence: devil in the details
evolution of virulence: devil in the detailsevolution of virulence: devil in the details
evolution of virulence: devil in the detailsBen Bolker
 
model complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsmodel complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsBen Bolker
 
model complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsmodel complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsBen Bolker
 
Fundamental principles (?) of biological data
Fundamental principles (?) of biological dataFundamental principles (?) of biological data
Fundamental principles (?) of biological dataBen Bolker
 
ESS of minimal mutation rate in an evo-epidemiological model
ESS of minimal mutation rate in an evo-epidemiological modelESS of minimal mutation rate in an evo-epidemiological model
ESS of minimal mutation rate in an evo-epidemiological modelBen Bolker
 
math bio for 1st year math students
math bio for 1st year math studentsmath bio for 1st year math students
math bio for 1st year math studentsBen Bolker
 
MBRS detectability talk
MBRS detectability talkMBRS detectability talk
MBRS detectability talkBen Bolker
 
Waterloo GLMM talk
Waterloo GLMM talkWaterloo GLMM talk
Waterloo GLMM talkBen Bolker
 
Waterloo GLMM talk
Waterloo GLMM talkWaterloo GLMM talk
Waterloo GLMM talkBen Bolker
 
Bolker esa2014
Bolker esa2014Bolker esa2014
Bolker esa2014Ben Bolker
 
virulence evolution (IGERT symposium)
virulence evolution (IGERT symposium)virulence evolution (IGERT symposium)
virulence evolution (IGERT symposium)Ben Bolker
 
Davis eco-evo virulence
Davis eco-evo virulenceDavis eco-evo virulence
Davis eco-evo virulenceBen Bolker
 
intro to knitr with RStudio
intro to knitr with RStudiointro to knitr with RStudio
intro to knitr with RStudioBen Bolker
 
Stats sem 2013
Stats sem 2013Stats sem 2013
Stats sem 2013Ben Bolker
 
computational science & engineering seminar, 16 oct 2013
computational science & engineering seminar, 16 oct 2013computational science & engineering seminar, 16 oct 2013
computational science & engineering seminar, 16 oct 2013Ben Bolker
 

More from Ben Bolker (20)

Ecological synthesis across scales: West Nile virus in individuals and commun...
Ecological synthesis across scales: West Nile virus in individuals and commun...Ecological synthesis across scales: West Nile virus in individuals and commun...
Ecological synthesis across scales: West Nile virus in individuals and commun...
 
evolution of virulence: devil in the details
evolution of virulence: devil in the detailsevolution of virulence: devil in the details
evolution of virulence: devil in the details
 
model complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsmodel complexity and model choice for animal movement models
model complexity and model choice for animal movement models
 
model complexity and model choice for animal movement models
model complexity and model choice for animal movement modelsmodel complexity and model choice for animal movement models
model complexity and model choice for animal movement models
 
Fundamental principles (?) of biological data
Fundamental principles (?) of biological dataFundamental principles (?) of biological data
Fundamental principles (?) of biological data
 
ESS of minimal mutation rate in an evo-epidemiological model
ESS of minimal mutation rate in an evo-epidemiological modelESS of minimal mutation rate in an evo-epidemiological model
ESS of minimal mutation rate in an evo-epidemiological model
 
math bio for 1st year math students
math bio for 1st year math studentsmath bio for 1st year math students
math bio for 1st year math students
 
MBRS detectability talk
MBRS detectability talkMBRS detectability talk
MBRS detectability talk
 
Waterloo GLMM talk
Waterloo GLMM talkWaterloo GLMM talk
Waterloo GLMM talk
 
Waterloo GLMM talk
Waterloo GLMM talkWaterloo GLMM talk
Waterloo GLMM talk
 
Bolker esa2014
Bolker esa2014Bolker esa2014
Bolker esa2014
 
Montpellier
MontpellierMontpellier
Montpellier
 
virulence evolution (IGERT symposium)
virulence evolution (IGERT symposium)virulence evolution (IGERT symposium)
virulence evolution (IGERT symposium)
 
Igert glmm
Igert glmmIgert glmm
Igert glmm
 
Davis eco-evo virulence
Davis eco-evo virulenceDavis eco-evo virulence
Davis eco-evo virulence
 
Google lme4
Google lme4Google lme4
Google lme4
 
intro to knitr with RStudio
intro to knitr with RStudiointro to knitr with RStudio
intro to knitr with RStudio
 
Stats sem 2013
Stats sem 2013Stats sem 2013
Stats sem 2013
 
computational science & engineering seminar, 16 oct 2013
computational science & engineering seminar, 16 oct 2013computational science & engineering seminar, 16 oct 2013
computational science & engineering seminar, 16 oct 2013
 
Threads 2013
Threads 2013Threads 2013
Threads 2013
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Estimating Demographic Parameters from Samples of Unmarked Individuals

  • 1. Background Model definitions Tools Tests Estimating demographic parameters from samples of unmarked individuals Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University 8 March 2011 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 2. Background Model definitions Tools Tests Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 3. Background Model definitions Tools Tests Ecological/statistical motivations Cryptic density-dependence Environmental variation + correlated variation in density . . . = cryptic density-dependence best possible estimates of demographic parameters? (Wilson & Osenberg 2002, Shima & Osenberg 2003) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 4. Background Model definitions Tools Tests Ecological/statistical motivations Data Repeated samples of individual animals . . . Multiple times, observers, locations Presence and size (imperfect) Estimate demographic parameters: birth/immigration death/emigration change (growth) . . . as a function of size, (population density) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 5. Background Model definitions Tools Tests Ecological/statistical motivations Data Repeated samples of individual animals . . . Multiple times, observers, locations Presence and size (imperfect) Estimate demographic parameters: birth/immigration death/emigration change (growth) . . . as a function of size, (population density) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 6. Background Model definitions Tools Tests Study system Natural history Thalassoma hardwicke (sixbar wrasse) Settlement: ≈ 5–10 mm Growth: a few mm per month Death: by predator (competition for refuges) Immigration/emigration: photo: Leonard Low, Flickr via species.wikimedia.org rare below 40–50 mm Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 7. Background Model definitions Tools Tests Study system Where they live Patch reefs, French Polynesia (and throughout the south Pacific) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 8. Background Model definitions Tools Tests Study system What they look like to me 80 Estimated fish size (mm) 60 40 20 Feb Mar Apr May Jun Jul Date Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 9. Background Model definitions Tools Tests Study system 40 What they look like to me 20 Feb Mar Apr Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 10. Background Model definitions Tools Tests Study system Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 11. Background Model definitions Tools Tests Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 12. Background Model definitions Tools Tests Demographic parameters as f (size) Growth Appearance Persistence 1.0 0.8 0.6 Probability (per day) 0.4 a.settle l.grow b.settle a.mort 0.2 tot.settle c.mort 0.0 1020304050607080 1020304050607080 1020304050607080 Fish size (mm) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 13. Background Model definitions Tools Tests Observation model Detection Measurement (probability) (standard deviation) 0.8 3.5 0.6 3.0 2.5 Measurement error Double−count 0.4 Zero−count 2.0 1.5 0.2 1.0 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 Fish size (mm) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 14. Background Model definitions Tools Tests Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 15. Background Model definitions Tools Tests State-space models State-space models Problem: estimating parameters of systems with un- or imperfectly-observed states? Easy if no feedback (measurement error models) With feedback (dynamic models), brute force approaches become infeasible . . . Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 16. Background Model definitions Tools Tests State-space models Directed acyclic graph (DAG) parameters N1 N2 N3 N4 N5 obs1 obs2 obs3 obs4 obs5 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 17. Background Model definitions Tools Tests Markov chain Monte Carlo Bayesian statistics, in 30 seconds computational (convenience) Bayesian statistics (forget all that stuff about philosophy of statistics, subjectivity, incorporating prior information . . . ) have a likelihood, L(θ) = Prob(data|θ) want a posterior probability, Ppost (θ) = Prob(θ|data) Bayes’ rule: L(θ) · prior(θ) Ppost (θ) = L(θ ) · prior(θ ) dθ may want mean, mode, confidence intervals, . . . denominator very high-dimensional Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 18. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability (provided chain is irreducible etc.) Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 19. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability q q (provided chain is irreducible etc.) Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 20. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability q qq (provided chain is irreducible etc.) Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 21. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability (provided chain is irreducible etc.) q qqq Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 22. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability (provided chain is irreducible etc.) q q q qq q q qqq Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 23. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) then stationary distribution = posterior probability (provided chain is irreducible etc.) Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 24. Background Model definitions Tools Tests Markov chain Monte Carlo Markov chain Monte Carlo θA Posterior probability MCMC rule: P(θ A ) J(θ B → θ A ) if = P(θ B ) J(θ A → θ B ) θB then stationary distribution = posterior probability (provided chain is irreducible etc.) Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 25. Background Model definitions Tools Tests Markov chain Monte Carlo Metropolis-(Hastings) updating θA Posterior probability Metropolis rule: accept B with probability P(θ B ) min 1, P(θ A ) satisfies MCMC rule . . . Don’t need to know denominator! Candidate distribution Parameter value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 26. Background Model definitions Tools Tests Gibbs/block sampling Gibbs sampling Joint distribution of parameters often difficult Condition each element on “known” (i.e. imputed) values of all other elements: P(a, b, c) = P(a|b, c)P(b, c) 0.5 1 Gibbs sampling: do this 5 2. 1.5 2 repeatedly for each 5 1. 2.5 3 element, or block of 5 0. 3.5 4.5 4 3 4 3.5 2 elements 1 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 27. Background Model definitions Tools Tests Gibbs/block sampling Gibbs sampling Joint distribution of parameters often difficult q Condition each element q q q q on “known” (i.e. imputed) q q q q q q values of all other q q q q q q qq elements: P(a, b, c) = q q q P(a|b, c)P(b, c) 0.5 q 1 Gibbs sampling: do this 5 2. q 1.5 2 repeatedly for each 5 1. 2.5 3 element, or block of 5 0. 3.5 4.5 4 3 4 3.5 2 elements 1 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 28. Background Model definitions Tools Tests Gibbs/block sampling Gibbs sampling Joint distribution of parameters often difficult q Condition each element q q q q on “known” (i.e. imputed) q q q q q q values of all other q q q q q q qq elements: P(a, b, c) = q q q P(a|b, c)P(b, c) 0.5 q 1 Gibbs sampling: do this 5 2. q 1.5 2 repeatedly for each 5 1. 2.5 3 element, or block of 5 0. 3.5 4.5 4 3 4 3.5 2 elements 1 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 29. Background Model definitions Tools Tests Gibbs/block sampling Back to the DAG parameters N1 N2 N3 N4 N5 obs1 obs2 obs3 obs4 obs5 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 30. Background Model definitions Tools Tests Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 31. Background Model definitions Tools Tests Perfect observation, trivial dynamics Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 32. Background Model definitions Tools Tests Perfect observation, trivial dynamics DAG parameters fates Demographic parameters|fates: standard M-H Fates|parameters N1 N2 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 33. Background Model definitions Tools Tests Perfect observation, trivial dynamics Scenario One fish of the same size observed Lsurv = (1 − m)(1 − p) S on two consecutive days . . . was it the same individual? (1 − m)(1 − p) P(surv|m, p) = 1 − m − p + 2mp X Lmort = mp(1 − p)S−1 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 34. Background Model definitions Tools Tests Perfect observation, trivial dynamics Updating probabilities for parameters mortality (m) 1.5 If the fish survived, then our 1.0 posterior probabilities for the 0.5 parameters are: type probability immigration (p) prior m ∼ Beta(1, 2) density 6 posterior (0 mortalities, 1 survival) 5 4 p ∼ Beta(1, S + 1) 3 2 (0 immigrations, S 1 non-immigrations) 0 0.2 0.4 0.6 0.8 probability Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 35. Background Model definitions Tools Tests Perfect observation, trivial dynamics Trivial example: results mortality (m) immigration (p) 4 2(m + S(1 − m)) 3 Beta(p,1,S) S+1 density 2 1 0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 value Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 36. Background Model definitions Tools Tests Perfect observation, trivial dynamics P(mortality & no immigration) ≈ 0.16 = 1/(S + 1); P(survival & immigration) ≈ 0.83 = S/(S + 1); results are simple and make sense; closed form solution is possible but ugly . . . combination of observations and non-observation of other individuals provides information (could fail with non-detection) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 37. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 38. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Non-trivial dynamics Multiple individuals, measured over multiple days Still simple: no density-dependent rates, immigration/emigration of large individuals observations still error-free Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 39. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Parameter/fate sampling parameters Parameter sampling: M-H updating with simple fates(1,2) fates(2,3) candidate distributions Fate sampling: ??? Enumerating N1 N2 N3 possibilities is tedious ... Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 40. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 41. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 42. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 43. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 44. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 45. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics M-H fate sampling 6 mm 7 mm dead 5 mm G (5) · (1 − M(5)) X M(5) 6 mm (1 − G (6)) · (1 − M(6)) G (6) · (1 − M(6)) M(6) absent I (6) I (7) X Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 46. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Sampling test 6 survives both grow w 5 grows Sampling Fate True Gibbs 6 grows both die 10−3.5 10−3 10−2.5 10−2 10−1.5 10−1 10−0.5 Probability Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 47. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Testbed Simulate for 80 days, with a settlement rate (tot.settle) of 5% day: 29 distinct individuals, size range 5–30, total of 618 fish-days (observations). Sample fates only (1000 MCMC steps), fixed demographic parameters Sampled 1000 unique fates (but only 895 unique likelihoods) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 48. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Testbed Simulate for 80 days, with a settlement rate (tot.settle) of 5% day: 29 distinct individuals, size range 5–30, total of 618 fish-days (observations). Sample fates only (1000 MCMC steps), fixed demographic parameters Sampled 1000 unique fates (but only 895 unique likelihoods) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 49. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics True demography30 25 20 size 15 10 5 0 20 40 60 80 day Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 50. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Fate-only results 0.05 0.04 Density 0.03 0.02 0.01 0.00 q −520 −500 −480 −460 Log−likelihood Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 51. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Sampling fates, parameters, both . . . 0.25 0.20 0.15 type fate only Density parameters only 0.10 both 0.05 0.00 −500 −490 −480 −470 −460 −450 Log−likelihood Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 52. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Parameter estimates 1 lgrow a.mort c.mort 140 3.0 0.8 120 2.5 100 2.0 0.6 80 1.5 0.4 60 1.0 40 0.2 0.5 20 −1.9 −1.7 −1.5 −1.3 −1.8 −1.6 −1.4 −1.2 −4.0 −3.5 −3.0 −2.5 0.010.015.020.025.030 0 0 0 0 density a.settle b.settle tot.settle 0.7 50 0.6 0.5 40 0.5 0.4 0.4 0.3 30 0.3 20 0.2 0.2 0.1 0.1 10 11 12 13 14 1.01.52.02.53.03.54.0 0.020.030.040.050.06 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 53. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Parameter estimates 2 Growth Appearance Persistence 1.0 q q q q 1.00 q qqqqqqqqqqqqqqqq 0.08 a.settle 0.8 b.settle 0.98 q q q q 0.06 tot.settle q 0.6 q q q 0.96 Probability q (per day) 0.04 q a.mort q 0.4 l.grow q q q q 0.94 c.mort q q q q q q q q 0.02 0.2 q q qqq q q q q q q q q 0.92 0.0 q 0.00 q qqqqqqqqqqqqqqqqqq q 0 5 10 15 20 25 30 0 5 10 15 20 25 30 0 5 10 15 20 25 30 Fish size (mm) Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 54. Background Model definitions Tools Tests Perfect observation, non-trivial dynamics Parameter estimates 3 a.mort a.settle b.settle −2.0 16 4.0 q 15 3.5 q −2.5 q q q 14 3.0 q q q 13 q q 2.5 −3.0 q q q q q q q q 2.0 q q q 12 q q q q −3.5 q q q q 1.5 11 1.0 −4.0 10 q c.mort lgrow tot.settle −1.2 0.045 0.030 q 0.040 0.025 q 0.035 −1.4 q q 0.020 q q q q q 0.030 q q q 0.015 q −1.6 q q q 0.025 q q q q 0.010 q 0.020 q q q q −1.8 0.015 q 0.005 q q q q 0.010 Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 55. Background Model definitions Tools Tests Imperfect observation Outline 1 Background Ecological/statistical motivations Study system 2 Model definitions 3 Tools State-space models Markov chain Monte Carlo Gibbs/block sampling 4 Tests Perfect observation, trivial dynamics Perfect observation, non-trivial dynamics Imperfect observation Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 56. Background Model definitions Tools Tests Imperfect observation Adding errors parameters fates(1,2) fates(2,3) Back to the more typical N1 N2 N3 graph: incorporate information from N(t − 1), N(t + 1), and current observation obs1 obs2 obs3 obs parameters Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 57. Background Model definitions Tools Tests Imperfect observation New algorithm For each individual: Pick true state at N(t), from all possible states, conditioning on N(t − 1) Pick identity at time N(t + 1) from feasible set: update probabilities Pick corresponding observation from observed(t): update probabilities Calculate likelihood, M-H update Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 58. Background Model definitions Tools Tests Imperfect observation Open questions, caveats Will it work ?? Add complexities: Multiple populations Spatial variation, correlation among parameters Simplify/generalize code Speed? Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals
  • 59. Background Model definitions Tools Tests Imperfect observation Conclusions & musings MCMC as powerful technology . . . can it be democratized? Data limitations shift over time: hierarchical models are great for “modern” (high-volume, low-quality) data Ben Bolker Departments of Mathematics & Statistics and Biology, McMaster University Estimating unmarked individuals