You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either the documentation for F.cjs.simulated needs to be updated, or the code for F.cjs.simulate needs adjustment
Documentation says:
If births.per.indiv is a vector of length NS - 1, then round( N(j)*births.per.indiv[,j] ) births will occur between occasions j and j+1, where N(j) is the true number of individuals in the realized population at occasion j.
However, actual code (lines 70) has
births.per.indiv is a vector of rates. Multiply by current number in population
sim.data <- mra::F.cjs.simulate( super.p=p,
super.s=phi, # survival probability
N1 = 1000, # initial population size of age 3 animals
births.per.indiv = c(1,1), # number of new recruits on a per individual basis
R=1) # number of populations to generate
actual population size
sim.data[[1]]$popln.n
gives
t1 t2 t3
1000 1036 1078
I would have expected it to give
N(2) = 1000*.5 + 10001 = 1500
It computes
N(2) = 1000.5 * 1000*.5*1 = 1000 ( the 1036 is simulation error)
Either the documentation for F.cjs.simulated needs to be updated, or the code for F.cjs.simulate needs adjustment
Documentation says:
If births.per.indiv is a vector of length NS - 1, then round( N(j)*births.per.indiv[,j] ) births will occur between occasions j and j+1, where N(j) is the true number of individuals in the realized population at occasion j.
However, actual code (lines 70) has
births.per.indiv is a vector of rates. Multiply by current number in population
Earlier in the code the survived vector is the number alive at time j from those alive at time j-1 so this does not match the documentation.
For example,
n.years <- 3
p <- rep(.1, n.years) # capture probability/year
phi <- rep(.50, n.years-1) # survival probability/year
sim.data <- mra::F.cjs.simulate( super.p=p,
super.s=phi, # survival probability
N1 = 1000, # initial population size of age 3 animals
births.per.indiv = c(1,1), # number of new recruits on a per individual basis
R=1) # number of populations to generate
actual population size
sim.data[[1]]$popln.n
gives
t1 t2 t3
1000 1036 1078
I would have expected it to give
N(2) = 1000*.5 + 10001 = 1500
It computes
N(2) = 1000.5 * 1000*.5*1 = 1000 ( the 1036 is simulation error)
Carl Schwarz
[email protected]
The text was updated successfully, but these errors were encountered: