# [R] Elasticity in Leslie Matrix

Simon Blomberg s.blomberg1 at uq.edu.au
Tue Oct 23 03:03:56 CEST 2007

```On Mon, 2007-10-22 at 06:24 -0700, privalan wrote:
> Dear R-users,
>
> I would like to calculate elasticities and sensitivities of each parameters
> involved in the following transition matrix:
>
> A <- matrix(c(
> sigma*s0*f1,  sigma*s0*f2,
>                s,                 v
> ), nrow=2, byrow=TRUE,dimnames=list(stage,stage))
>
>
> The command "eigen.analysis" avaliable in package "popbio" provides
> sensibility matrix and elasticity matrix (same dimension than A). I would
> like to know if there is a way to calculate separetely the elasticity of
> sigma, s0, f1, f2, s and v ?

You should first calculate the matrix element sensitivities, then
calculate the derivatives of the elements of your matrix with respect to
the parameter of interest. Then for each element in the matrix, the
sensitivity of the parameter is just the product of the derivative and
the appropriate element sensitivity, by the chain rule. Then add up all
the sensitivities, multiply by your parameter and divide by lambda. ie

plot(1:10, 1:10, type="n")

text(5,6, expression(e[s]  == over(s,
lambda)~sum(~over(paste(partialdiff,~lambda),paste(partialdiff,~a[ij]))
%.% over(paste(partialdiff, ~a[ij]), paste(partialdiff, ~s)), ij)),
cex=2)

Be aware that these elasticities will in general not sum to unity, and
cannot be interpreted as "contributions" to lambda. See Caswell (2001),
page 232.

Cheers,

Simon.

>
> Thanks and regards,
>
> privalan
--
Simon Blomberg, BSc (Hons), PhD, MAppStat.
Lecturer and Consultant Statistician
Faculty of Biological and Chemical Sciences
The University of Queensland
St. Lucia Queensland 4072
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.