Thank you Ben for your answer.
You're right, it works with the log-normal. Unfortunately, the log-normal
distribution is not well suited for survival rates as it is not bounded to
1,  and truncation is not trivial as it changes moments anyway.
However, here is maybe a solution, after some brain storming at work (not
my idea though):
In order to have a fixed geometric mean S, samples of survival rates for a
given level of stochasticity can be calculated using S^xi, with xi
following a gamma distribution, whose shape and rate are the same (say
theta). Theta is inversely related to the level of stochasticity, and
should not be too low (e.g. not much lower than 1) to be reasonable. How
can a rate have a very large variance and a fixed mean different from 0.5
while being bounded between 0 and 1 anyway?
Some explanation:
The gamma distribution has an arithmetic mean of 1 when the shape and the
rate (1/scale) are the same. Therefore, if we want n values of survival
rates si, with a certain level of stochasticity defined by theta,
if xi = rgamma(n, theta, theta) and si = S^xi,
log(si) = log(S^xi) = xi*log(S),
mean(log(si)) = mean(xi)*log(S) = log(S), as mean(xi) = 1 and S is constant,
and therefore, the geometric mean of si is:
exp(mean(log(si))) = exp(log(S)) = S,
while keeping si between 0 and 1 because S is a rate. Et voila!
I just tried this solution with my population models and it seems to work
reasonably well. A stable population (on average) is still stable
regardless of the level of stochasticity, which is what I wanted.
Cheers,
-Yvan


On 12 November 2011 14:39, Ben Bolker-4 [via r-sig-ecology] <
ml-node+s471788n6987283h47@n2.nabble.com> wrote:

> FrogWave <thefrenchstick@...> writes:
>
> > 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...
>
>
>   It's not possible, I think.  You can try to *correct* for it
> (i.e., for a specified variance and a desired geometric mean,
> increase the arithmetic mean), but you can't include stochasticity
> without changing the GM -- it's a fact of life (or mathematics).
>
>   For the log-normal equivalent, it's fairly easy to do this analytically.
>
> For a geometric mean of exp(logmu) and a standard deviation on
> the log scale of sdS, the arithmetic mean of the log-normal is
> AM = exp(logmu+sdS^2/2). The mode and the median of the log-normal
> are unchanged by transformation (and by noise).  Hence I think you
> can get what you want in the LN case by increasing your logmu by
> sdS^2/2 (this is a little fuzzy, it's late, there may be an error,
> but I'm going to send it off anyway).
>
>   For the logit-normal I'm not sure whether there's an equivalent
> analytical trick.
>
>   Ben Bolker
>
> _______________________________________________
> R-sig-ecology mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6987283&i=0>
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r-sig-ecology.471788.n2.nabble.com/stochastic-annual-survival-rate-tp6960460p6987283.html
>  To unsubscribe from stochastic annual survival rate, click here<http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6960460&code=dGhlZnJlbmNoc3RpY2tAZ21haWwuY29tfDY5NjA0NjB8LTEwMDUyMDU4>
> .
> See how NAML generates this email<http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


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

