r                   package:FLCore                   R Documentation

_I_n_t_r_i_n_s_i_c _r_a_t_e _o_f _i_n_c_r_e_a_s_e _f_r_o_m _a_n _F_L_B_i_o_l _o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     For an 'FLBiol' object with the mortality-at-age, fecundity and
     spwn data  present in the object slots, this method calculates the
     intrinsic rate of increase r  for the given population.

     It does this using two methods:

     (1) Solving the Euler-Lotka equation.

     (2) Calculating the logarithm of the real part of the largest/lead
     eigenvalue  of the Leslie transition matrix.

     These two methods are not identical but do give similar answers
     for the same data  and parameters

_U_s_a_g_e:

     r(object, ...)

_A_r_g_u_m_e_n_t_s:

  object: An object of type 'FLBiol-class'.

     ...: Extra arguments accepted by each implementation.

_D_e_t_a_i_l_s:

     To chose the method used to estimate r (Euler-Lotka or Leslie
     matrix) we supply either  'el' or 'leslie' as the 'method'
     argument (see below). To calculate r along years or cohorts by
     supply either 'year' or 'cohort' as the 'by' argument (see below).

     The method can handle Monte Carlo samples (i.e. with iterations)
     in either the fec, m or both slots required to calculate r and the
     conversion is done internally so that we obtain an 'FLQuant' of
     the correct dimensions.

_V_a_l_u_e:

     An object of class 'FLQuant-class'.

_A_u_t_h_o_r(_s):

     FLR Team

_S_e_e _A_l_s_o:

     'FLBiol-class'

_E_x_a_m_p_l_e_s:

     ## Not run: 

     # call in the NS herring stock and biol objects

     data(nsher.biol)
     data(nsher)

     # calculate the gradient at the origin from the spawning stock numbers to the recruits

     tmp <- nsher.biol
     n(tmp) <- stock.n(nsher)
     m(tmp) <- harvest(nsher)+m(nsher.biol)

     # use nls to calculate gradient of (recruits/spawning stock numbers)
     # assuming log-normal errors

     dfx <- data.frame(rec=as.vector(n(tmp)[1,]),ssn=as.vector(ssn(tmp)))
     res <- nls(log(rec)~log(a)+log(ssn),dfx,start=list(a=mean(n(tmp)[1,]/ssn(tmp))))

     # use this value of recruits per spawner times maturity as the birth function for 
     # the Leslie transition matrix/Euler-Lotka equation

     alpha <- coef(res)[[1]]
     fec(tmp)[] <- fec(tmp)[] * alpha

     # calculate r assuming only natural mortality and by year
     # using both Euler-Lotka (el) and Lesie matrix (leslie) method

     m(tmp) <- m(nsh.biol)
     r.nsh.el <- r(tmp,by='year',method='el')
     r.nsh.lm <- r(tmp,by='year',method='leslie')
     ## End(Not run)

