simHMM and sampling effort

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

simHMM and sampling effort

Postby SoConfused » Sat Nov 09, 2019 11:01 am

I would like to simulate data under a series of sampling effort values to compare estimate precision. I'm hung up on how to do that using the simHMM framework. Below is a toy example. Let's assume that the data were collected using 100 traps, and I would like to simulate 150 traps, under an assumption of linear increase of catch.

It is my understanding that this should be simulated as a doubling of the new animals (freq in df below) and in a doubling of the recap probability. However, the function takes in values of beta (logit space), not raw recap probs. My actual model is somewhat complex (something like group * time + factor, for example), so I'm looking for a generic solution if possible.

fake data:
Code: Select all
library(dplyr)
library(marked)

df <- structure(list(ch = c("100000000000", "100000000000", "100000000000",
"010000000000", "010000000000", "010000000000", "001000000000",
"001000000000", "001000000000", "000100000000", "000100000000",
"000100000000", "000010000000", "000010000000", "000010000000",
"000001000000", "000001000000"), Group = structure(c(1L,
2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L
), .Label = c("a", "b", "c"), class = "factor"), freq = c(21,
14, 3, 47, 62, 14, 48, 43, 8, 64, 67, 25, 65, 63, 17, 82, 55)), row.names = c(1L,
2L, 3L, 6L, 7L, 8L, 15L, 16L, 17L, 24L, 25L, 26L, 33L, 34L, 35L,
43L, 44L), class = "data.frame")


Then specifying the sim structure
Code: Select all
modelspec <- list(Phi = list(formula = ~ 1),   p = list(formula = ~ 1))
dp.sim <- marked::process.data(df, model="HMMcjs")
ddl.sim <- marked::make.design.data(dp.sim)
               
phi <- 1
p <- -2.8
   
initial <- list(Phi = phi,   p = p)
realization <- simHMM(dp.sim, ddl.sim, model="HMMcjs", model.parameters = modelspec, initial = initial)
SoConfused
 
Posts: 56
Joined: Wed Nov 05, 2014 8:25 am

Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests