Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Births/individual is based on number in population x survival rate and not number in population #3

Open
cschwarz-stat-sfu-ca opened this issue Sep 25, 2018 · 0 comments

Comments

@cschwarz-stat-sfu-ca
Copy link

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

        births <- round(sum(survived) * births.per.indiv[j-1])

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant