Hi all,
I want to simulate the trajectories over time of animal populations for
which I know the annual survival rate, S, estimated in the field from
several years of data. I want to look at the effect of various levels of
environmental stochasticity, defined as independent year-to-year variations
in the survival rate. What I did is to add a normally distributed random
variable of mean 0 to the logit of S, and back-transformed (see below), but
I realised than doing so leads to a lower geometric mean (i.e. the annual
survival rate) and that the difference increases with the level of
stochasticity . So how can I include stochasticity without changing the
geometric mean? Any insight would be very appreciated.


logit <- function(x)
               return( log( x / (1-x) ))
invlogit <- function(x)
               return( exp(x) / (1 + exp(x)))

S = 0.92  # annual survival rate
sdS = 0.4 # standard error of S on the logit scale
nS = 100000  # number of samples
Svar = invlogit( logit(S) + rnorm(nS, 0, sdS))  # stochastic survival rate

gmeanS = exp( mean( log(Svar) ))  # geometric mean of S
gmeanS    # geometric mean of stochastic survival rate less than 0.92...



--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/stochastic-annual-survival-rate-tp6960460p6960460.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

