RMark Jolly Seber POPAN开放人口固定值

时间:2018-11-26 19:59:52

标签: r

我想使用时间,单个和固定参数来运行多个POPAN模型,以作为捕获概率(p)参数。我有6年(2012-2017),每年都有唯一的p固定估计。如何为每年创建p的唯一值?我可以在MARK程序中完成它,但不能在R包中完成。

run.Cap1 <- function() {
 Phi.time = list(formula =  ~ time)
Phi.dot = list(formula = ~ 1)
 p.time = list(formula =  ~ time)
p.fixed=list(formula=~time,fixed=list(time=c(1,2,3,4,5,6),value=c(0.0478,0.0478,0.0478,0.0478,0.0556,0.04)))
 pent.time = list(formula =  ~ time)
  N.dot = list(formula =  ~ 1)

  Phi.time.p.time.pent.time.N = mark(
    Cap1.pr,
    Cap1.ddl,
    model.parameters = list(
      Phi = Phi.time,
      p = p.time,
      pent = pent.time,
      N = N.dot))

  Phi.time.p.fixed.pent.time.N = mark(
    Cap1.pr,
    Cap1.ddl,
    model.parameters = list(
      Phi = Phi.time,
      p = p.fixed,
      pent = pent.time,
      N = N.dot))

  Phi.dot.p.time.pent.time.N = mark(
    Cap1.pr,
    Cap1.ddl,
    model.parameters = list(
      Phi = Phi.dot,
      p = p.time,
      pent = pent.time,
      N = N.dot))

 Phi.time.p.time.pent.time.N =
    adjust.parameter.count(Phi.time.p.time.pent.time.N, 16)
  return(collect.models())
}


Cap1.results <- run.Cap1()

options(width = 150)
Cap1.results

0 个答案:

没有答案