estimates of fidelity for HY age classes

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

estimates of fidelity for HY age classes

Postby splash1199 » Tue Feb 26, 2019 8:56 pm

Hi RMark Users,

I need some clarification on estimates of fidelity in live-dead models. In RMARK: A gentle introduction, fidelity is defined as the probability that a bird that has survived from year i to i+1 has returned to capture site.

Given this definition, why does RMARK estimate fidelity for the hatch-year age class, given that no birds return at t+1 as hatch years?

In my case, I am modelling survival of waterfowl banded as HY, SY, ASY, and I don't think it makes sense to have HY fidelity estimates. But I can't seem to make the model run.

I have provided my code below. I would like to model F as
"~ -1 + sy + asy:sex" but the model will not run without hy included, "~ -1 + hy + sy + asy:sex"

any ideas and or clarification?

Code: Select all
pre.df <- convert.inp("./data/SNGO_BLGO_livedead_1998-2007.inp", group.df = data.frame(age_sex=c("HY Male", "HY Female", "SY Male", "SY Female", "ASY Male", "ASY Female")) , use.comments = TRUE)

#split the age and sex information into two separate columns
pre.df <- tidyr::separate(pre.df, age_sex, c("age", "sex"), " ")
#coerce age and sex into factors
pre.df$age <- as.factor(pre.df$age)
pre.df$sex <- as.factor(pre.df$sex)
```

#process the data by defining the model type as "Burnham" and the groups in the data
pre.proc = process.data(data = pre.df,
   model       = "Burnham",
   groups      = c("age", "sex"),
   age.var     = 1,
   initial.age = c(2, 0, 1))
#ASY (2), HY (0), SY (1)

# make the design data from the process data above
pre.ddl = make.design.data(pre.proc)

#add the correct binning to the design data so that individuals that were marked as HY are SY
#in their second year of life, and ASY in their third year, etc
pre.ddl=add.design.data(data = pre.proc,
   ddl = pre.ddl,
   parameter="S",
   type = "age",
   bins = c(0, 0.5, 1.5, 30),
   right = FALSE,
   name = "age",
   replace = TRUE)
levels(pre.ddl$S$age) = c("HY", "SY", "ASY")
#add a dummy variables; all three age classes
pre.ddl$S$hy     = ifelse(pre.ddl$S$age == "HY", 1, 0)
pre.ddl$S$sy     = ifelse(pre.ddl$S$age == "SY", 1, 0)
pre.ddl$S$asy    = ifelse(pre.ddl$S$age == "ASY", 1, 0)
#add a dummy variables for HY and AHY
pre.ddl$S$adult  = ifelse(pre.ddl$S$age != "HY", 1, 0)
pre.ddl$S$young  = ifelse(pre.ddl$S$age == "HY", 1, 0)

#pre.ddl$S$adultclass = ifelse(pre.ddl$S$age == "HY", "HY", "AHY")


#repeat for p
pre.ddl=add.design.data(data = pre.proc,
   ddl = pre.ddl,
   parameter="p",
   type = "age",
   bins = c(0, 0.5, 1.5, 30),
   right = FALSE,
   name = "age",
   replace = TRUE)
levels(pre.ddl$p$age) = c("HY", "SY", "ASY")
#add a dummy variables; all three age classes
pre.ddl$p$hy     = ifelse(pre.ddl$p$age == "HY", 1, 0)
pre.ddl$p$sy     = ifelse(pre.ddl$p$age == "SY", 1, 0)
pre.ddl$p$asy    = ifelse(pre.ddl$p$age == "ASY", 1, 0)
#add a dummy variables for HY and AHY
pre.ddl$p$adult  = ifelse(pre.ddl$p$age != "HY", 1, 0)
pre.ddl$p$young  = ifelse(pre.ddl$p$age == "HY", 1, 0)

#repeat for F
pre.ddl=add.design.data(data = pre.proc,
   ddl = pre.ddl,
   parameter="F",
   type = "age",
   bins = c(0, 0.5, 1.5, 30),
   right = FALSE,
   name = "age",
   replace = TRUE)
levels(pre.ddl$F$age) = c("HY", "SY", "ASY")
#dummy variables for all three age classes
pre.ddl$F$hy     = ifelse(pre.ddl$F$age == "HY", 1, 0)
pre.ddl$F$sy     = ifelse(pre.ddl$F$age == "SY", 1, 0)
pre.ddl$F$asy    = ifelse(pre.ddl$F$age == "ASY", 1, 0)
#dummy variables for HY and AHY
pre.ddl$F$adult  = ifelse(pre.ddl$F$age != "HY", 1, 0)
pre.ddl$F$young  = ifelse(pre.ddl$F$age == "HY", 1, 0)

#repeat for r
pre.ddl=add.design.data(data = pre.proc,
   ddl = pre.ddl,
   parameter="r",
   type = "age",
   bins = c(0, 0.5, 30),
   right = FALSE,
   name = "age",
   replace = TRUE)
levels(pre.ddl$r$age) = c("HY", "AHY")
#dummy variables for HY and AHY
pre.ddl$r$adult  = ifelse(pre.ddl$r$age != "HY", 1, 0)
pre.ddl$r$young  = ifelse(pre.ddl$r$age == "HY", 1, 0)

test2 = RMark::mark(data = pre.proc,
   ddl = pre.ddl,
  model.parameters = list(
    S = list(formula = ~ -1 + age + time),
    p = list(formula = ~ -1 + sy + asy:time),
    F = list(formula = ~ -1 + hy + sy + asy:sex),
    r = list(formula = ~ -1 + young + adult:sex)),
   invisible = FALSE,
   model = "Burnham")
```
splash1199
 
Posts: 5
Joined: Mon Feb 04, 2019 2:22 pm

Re: estimates of fidelity for HY age classes

Postby cooch » Tue Feb 26, 2019 9:38 pm

splash1199 wrote:Hi RMark Users,

I need some clarification on estimates of fidelity in live-dead models. In RMARK: A gentle introduction, fidelity is defined as the probability that a bird that has survived from year i to i+1 has returned to capture site.

Given this definition, why does RMARK estimate fidelity for the hatch-year age class, given that no birds return at t+1 as hatch years?


I'll let Jeff sort through the RMark bits, but I suspect you're misunderstanding the fidelity parameter (F). The complement, 1-F, is the probability of *permanent* emigration, not temporary (this is noted in several places in chapter 9). So, flipping the logic, if a marked individual is in the sample AHY, then it was also in the sample HY. You may not live encounter HY individuals, but in theory, a dead recovery can occur anywhere, and so, F for HY can be estimated. [If a dead recovery can't occur anywhere, but (say) occurs only in the areas where you also live mark, then the definition of fidelity means something else.]

Again, (1-F) means *permanent* emigration. It seems as if you're thinking temporary emigration (i.e., that a HY individual leaves the live encountere sampling area, and then returns as AHY). Fine, if thats the case, the p for live encounter for HY is fixed to 0, and you move on from there.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest