We assume that the nonobservable Markov/semi-Markov model comprises several transient states and a final absorbing state, with all transient states being nonhomogeneous Markovian except one that is semi-Markovian.

For the stopover duration application, the nonobservable Markov/semi-Markov model comprises three states: an initial transient Markovian state followed by a transient semi-Markovian state, and a final absorbing state. A state is said to be transient if the probability of definitively leaving this state without the possibility of returning to it is >0. The states are thus ordered, and each state can be visited exactly once (“left-right” model); see Fig. 1.

For the breeding attendance application, the nonobservable Markov/semi-Markov model comprises six states: two Markovian states forming an initial transient class followed by a transient semi-Markovian state, then two successive transient Markovian states, and a final absorbing state. The initial transient class and the 4 following states are ordered; the states are thus partially ordered (no ordering between states 1 and 2 in the initial transient class), and only the first two states can be visited more than once; see Fig. 2.

#### Estimating stopover duration

For birds that need to refuel during their migratory journey, the time spent at a stopover site may be identical whatever the date of arrival and may be determined by the number of days needed for feeding. Recently, Pledger *et al*. (2009); Pradel (2009); Fewster and Patenaude (2009) independently proposed a time elapsed as arrival-dependent modeling approaches for estimating stopover duration. To deal with residence time since arrival, we cannot condition on the past state as in the classical first-order Markov chain. We also need to know for how long an individual has been present. One convenient method for representing stopover duration is to introduce semi-Markovian states where the time spent in these states is explicitly modeled by appropriate sojourn time distributions.

To do this, we consider a three-state model made up of an initial "not yet arrived" transient state which is the state before arrival at the site, an intermediate "arrived" transient state which is the state of arrival at the site, and a final "departed" absorbing state which is the state of leaving the site. The intermediate "arrived" state is semi-Markovian, while the other two "not yet arrived" and "departed" states are Markovian. We assume that "not yet arrived" state is the only possible initial state, that is, *π*_{1}=1. For this initial transient Markovian state, we assume that only the self-transition and the transition to the semi-Markovian "arrived" state are possible with a transition distribution that depends on the time index *t*. For this nonhomogeneous Markovian state, full time-dependent models are used for the transition distribution. Hence, the initial probability vector and the transition probability matrix are given by

- (3)

with the probability of an individual not present at the site actually arriving between occasions *t* and *t*+1. We assume that = 1, that is, all individuals are present at the site before occasion *T*. A parametric or nonparametric sojourn time distribution is attached to the semi-Markovian "arrived" state. In Choquet *et al*. (2013b), several nongeometric distributions were used and compared.

The set of observations is *O*_{t} = {0 for "not captured", 1 for "captured"}. Concerning the observation models, we assume that only the "not captured" output can be observed in the initial "not yet arrived" state. The corresponding observation distribution is thus degenerate. For the intermediate "arrived" state, the observation distribution depends on the index parameter *t*. The observation probability matrix is thus given by

- (4)

with the probability of an individual being in state *j* at time *t* to be observed as *y*. This model, represented in Fig. 1, can be easily generalized to deal with different sources of heterogeneity. For example, the output process can be adapted to the case where trap effects are present (Choquet *et al*. 2013b). Neglecting trap effects, sometimes due to the food used to catch the birds and stress caused by handling, can lead to marked bias in estimating stopover duration.

#### Incorporating incubation period duration

Since 1974, greater flamingos have bred on an artificial island located in the commercial saltpans of Salin-de-Giraud (Camargue, southern France). Flamingos generally start incubating in April. At age of 10 days, the chicks gather in small crèches on the breeding island before moving into the water to join a larger crèche which may contain up to several thousand individuals (Johnson and Cezilly 2007). Since 1977, 12% of the chicks fledged in the Camargue have been ringed each year with PVC rings engraved with alphanumeric codes that can be read from a distance of up to 300 m. We used the subsequent resightings of these ringed birds as breeding adults at the colony in 1991. In that year, an average of 10 hours per day was spent in the towel observing the colony from April 2 (first egg observed) to July 16, and 2 hours per day were spent at the crèche, from July 16 to September 8 (end of observation period). Ringed birds were resighted by means of a telescope located in a hide 70 m from the colony. Only flamingos observed at least once as breeders were considered. We divided the breeding season into 18 intervals, each of 10 days.

The set of observations is *O*_{t} = {0 for "not captured", 1 for "seen incubating an egg", 2 for "feeding a chick on the breeding island", 3 for "feeding a chick in the créche"}.

We considered a six-state model made up of a transient class with two states "elsewhere/preincubating", and "incubation with failure" , three successive transient states "incubation with success", "feeding on the island" and "feeding in the crèche", and a final absorbing state "departed after incubation with success". The intermediate transient state "incubation with success" is semi-Markovian, while the other states are Markovian; see Fig. 2 for a representation of this model. We used the fact that the length of the incubation period is fixed and is known to last 29 days. The sojourn time distribution of incubation becomes *d*_{SM}(3) = 1 with SM= "incubation with success". An individual that has not succeeded in the incubation may move back to the initial state, "elsewhere/preincubating".

We assume here that "elsewhere/preincubating" is the only possible initial state, that is, *π*_{1} = 1. Hence, the initial probability vector and the transition probability matrix are given by:

- (5)

The observation probability matrix is:

- (6)

Because the reproduction pattern changes with time, we need specific transition probabilities for the beginning, the middle, and the end of the season. Furthermore, Schmaltz *et al*. (2011) demonstrated that rainfall has an effect on reproduction at intervals 7 and 8 (i.e., between occasions 7 and 9). Thus, for states 1 to 3, we consider successive time periods corresponding to groupings of intervals 1 to 3, 4 to 6, 7, 8, 9 to 10, 11 to 15, and 16 to 18 for which transitions are set constant. Furthermore, we assume that and . For states 4 to 6, we consider three successive time periods, 4 to 6, 7 to 8, and 9 to 18.

We consider also specific capture probabilities for successive time periods, occasions 4 to 7, 8, 9 and 10 to 19 for which capture probabilities are constant. Furthermore, as there is no capture for the first period, .

Models were built using the E-SURGE program (Choquet *et al*. 2009), and we computed maximum likelihood estimates (MLE) for each model using a quasi-Newton algorithm (Dennis and Schnabel 1983) with multiple starting points to avoid spurious local minima. MLE and confidence intervals are given in Tables 1 and 2. We did not attempt to find the most parsimonious model here using Akaike information criteria (Akaike 1987) as this was not the goal of this study. Guédon (1999) proposed a validation methodology relying on the fit of different types of characteristic distributions computed from model parameters to their empirical equivalents extracted from data. In particular, we used the fit of output distributions conditional on the observed sequence at each capture occasion; see Guédon (2005) for the recursive algorithms for computing state and output distributions conditional on the observed sequence for each successive time *t* in the case of hidden hybrid Markov/semi-Markov models. We compared the proportion of estimated and observed individuals for each possible output. Figure 3 shows that the model successfully reproduces the general pattern of the observations.

Table 1. Estimated transition probabilities in the incubation model. means transition between state *i* and state *j* for time periods grouping intervals *k* to *l*. MLE stands for maximum likelihood estimate, CI for confidence interval and SE for standard error. NA stands for nonavailable.Parameters | MLE | CI | SE |
---|

| 0.720 | (0.637, 0.790) | 0.039 |

| 0.012 | (0.004, 0.036) | 0.007 |

| 0.886 | (0.727, 0.958) | 0.055 |

| 0.112 | (0.041, 0.271) | 0.055 |

| 0.840 | (0.813, 0.864) | 0.013 |

| 0.079 | (0.062, 0.100) | 0.010 |

| 0.312 | (0.221, 0.419) | 0.051 |

| 0.099 | (0.072, 0.135) | 0.016 |

| 0.651 | (0.317, 0.883) | 0.161 |

| 0.00 | NA | NA |

| 0.308 | (0.027, 0.875) | 0.300 |

| 0.00 | NA | NA |

| 0.686 | (0.613, 0.750) | 0.035 |

| 0.300 | (0.237, 0.372) | 0.034 |

| 0.681 | (0.554, 0.785) | 0.059 |

| 0.300 | (0.198, 0.426) | 0.059 |

| 0.864 | (0.677, 0.951) | 0.066 |

| 0.00 | NA | NA |

| .594 | ( 0.373, 0.783) | 0.111 |

| 1.00 | NA | NA |

| 0.722 | (0.643, 0.790) | 0.037 |

| 0.261 | (0.196, 0.338) | 0.036 |

| 0.00 | NA | NA |

| 0.00 | NA | NA |

| 0.835 | (0.754, 0.894) | 0.035 |

| 0.013 | (0.005, 0.033) | 0.006 |

| 0.873 | (0.754, 0.940) | 0.046 |

| 0.126 | (0.060, 0.246) | 0.046 |

| 0.327 | (0.278, 0.381) | 0.026 |

| 0.567 | (0.530, 0.603) | 0.019 |

| 0.00 | NA | NA |

| 0.049 | (0.023.098) | 0.018 |

| 1.00 | NA | NA |

| 0.00 | NA | NA |

| 0.597 | (0.477, 0.706) | 0.059 |

| 0.00 | NA | NA |

| 1.000 | (1.000, 1.000) | 0.000 |

| 1.000 | (1.000, 1.000) | 0.000 |

Table 2. Estimated capture probabilities in the incubation model. means capture probability for observation *j* conditional on being in state *i* for time periods grouping occasions *k* to *l*. MLE stands for maximum likelihood estimate, CI for confidence interval and SE for standard error. NA stands for non-available.Parameters | MLE | CI | SE |
---|

| 0.660 | (0.521, 0.774) | 0.066 |

| 0.182 | (0.145, 0.225) | 0.020 |

| 0.744 | (0.290, 0.953) | 0.190 |

| 0.00 | NA | NA |

| 1.00 | NA | NA |

| 0.124 | (0.097, 0.156) | 0.015 |

| 0.287 | (0.097, 0.603) | 0.139 |

| 0.00 | NA | NA |

| 0.761 | (0.227, 0.972) | 0.221 |

| 0.267 | (0.233, 0.304) | 0.018 |

| 0.360 | (0.124, 0.690) | 0.162 |

| 0.00 | NA | NA |

| 0.729 | (0.546, 0.857) | 0.081 |

| 0.710 | (0.680, 0.739) | 0.015 |

| 0.875 | (0.816, 0.917) | 0.025 |

| 0.088 | (0.076, 0.102) | 0.006 |

We show in Fig. 4 the state distributions at each capture occasion in order to illustrate the dynamics of incubation. The general pattern is shown in Fig. 4 corresponds to expectations regarding the successive steps of greater flamingo breeding dynamics. Birds incubated (successfully or not) from the start of the breeding period to occasion 14 at which point the island was deserted. At this occasion, no birds started to incubate as they would not have had enough time to complete the full breeding cycle before food and climatic conditions deteriorate in the fall. Hatching was first observed at occasion 6 (Fig. 3). From then on, the proportion of birds feeding a chick on the island then in the crèche increased gradually until the end of the observation period (Fig. 4). Regarding incubation, occasions 7 and 8 appeared to be pivotal given that the proportion of incubating birds that managed to hatch their egg (incubation with success) increased slowly until occasion 7 then peaked at occasions 8 and 9. In contrast after occasions 7 and 8, the proportion of unsuccessful incubating birds (incubation with failure) dropped almost to zero. Heavy rains at occasions 7 and 8 [corresponding to occasions 4 and 5 in Schmaltz *et al*. (2011)] were shown to cause substantial nest desertion (flooding nests and eggs) and were likely the cause of the failure of early incubating birds. The peak seen in the proportion of successful incubating birds suggests that a second wave of incubating birds settled after the rainy period, with most of these birds being successful. As birds with failed incubation may make a second attempt, the second wave may have been partially made up of renesters. We also computed *E*(*N*_{21}|*o*_{1}*o*_{2}…*o*_{T}) the mean number of times that state 2: "incubation with failure" was followed by state 1: "elsewhere/preincubating". The estimated value for *E*(*N*_{21}|*o*_{1}*o*_{2}…*o*_{T}) was 1.1 [0;2.2] showing that an individual left the incubation area once on average. This result strengthens the proposed model which does not differentiate between individuals arriving for the first time or not in the incubation area.