class: center, middle, inverse, title-slide # Lab 2_Exponential growth model ### Vratika Chaudhary ### Population Ecology. ### 2020/01/17 --- class: center, middle .pull-left[ Exponential growth model  ] .pull-right[ Burmese pythons in Everglades  ] --- # Expontnial growth models can be expressed as: Differential equation format `$$\frac{dN}{dT}=rN$$` Intergral format `$$N_t=N_oe^{rt}$$` where - r = per capital growth rate - No = Initial population size - Nt = Projected population size - t = Time of projection - e = natural log base (2.713..) --- # Realation between r and lambda r = per capita population growth rate lambda = finite or discrete time growth rate `$$\lambda=e^r$$` `$$r=ln(\lambda)=ln[{\frac{N_t+1}{N_t}}]$$` *In R, log means natural log --- # Estimating R and lambda Using time series data or population sizes # Method 1- Regression method `$$y=mx+b$$` y= output variable (population size) m= slope of the regression line x= predictor variable (year in our case) b= intercept of the regression line ```r #regression population =c(400,475,540,580,598,500,600,610,645,670)#example data year=1:10 #example data x= year y = log(population) model= lm(y~x) summary(model) ``` ``` # # Call: # lm(formula = y ~ x) # # Residuals: # Min 1Q Median 3Q Max # -0.129456 -0.016554 -0.004167 0.063969 0.109088 # # Coefficients: # Estimate Std. Error t value Pr(>|t|) # (Intercept) 6.076581 0.059882 101.475 9.93e-14 *** # x 0.044340 0.009651 4.594 0.00177 ** # --- # Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # # Residual standard error: 0.08766 on 8 degrees of freedom # Multiple R-squared: 0.7252, Adjusted R-squared: 0.6908 # F-statistic: 21.11 on 1 and 8 DF, p-value: 0.001769 ``` ```r r= model$coefficients[[2]] r ``` ``` # [1] 0.04433963 ``` --- ```r #regression summary(model) ``` ``` # # Call: # lm(formula = y ~ x) # # Residuals: # Min 1Q Median 3Q Max # -0.129456 -0.016554 -0.004167 0.063969 0.109088 # # Coefficients: # Estimate Std. Error t value Pr(>|t|) # (Intercept) 6.076581 0.059882 101.475 9.93e-14 *** # x 0.044340 0.009651 4.594 0.00177 ** # --- # Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # # Residual standard error: 0.08766 on 8 degrees of freedom # Multiple R-squared: 0.7252, Adjusted R-squared: 0.6908 # F-statistic: 21.11 on 1 and 8 DF, p-value: 0.001769 ``` ```r r= model$coefficients[[2]] r ``` ``` # [1] 0.04433963 ``` --- # Regression method plot ```r plot(x,y) abline(model) ``` <!-- --> --- #Method 2- Ratio method `$$\lambda= \frac{N_{t+1}}{N_t}$$` lambda value for each time step and `$$r=log(mean(\lambda))$$` ```r #Ratio method pop<- c(500,524,560,579,589,600,650)#population vecto pop #population vector ``` ``` # [1] 500 524 560 579 589 600 650 ``` ```r len<- length(pop) len #length of population vector ``` ``` # [1] 7 ``` ```r lambda<- pop[-1]/pop[-len] ``` --- ```r pop<- c(500,524,560,579,589,600,650)#population vecto pop #population vector ``` ``` # [1] 500 524 560 579 589 600 650 ``` ```r len<- length(pop) #Ratio method lambda<- pop[-1]/pop[-len] lambda.mean = mean(lambda) lambda.mean ``` ``` # [1] 1.044985 ``` ```r r = log(lambda.mean) #per capita growth rate r ``` ``` # [1] 0.0440027 ``` --- #Stochastic differential equation method (Dennis et al. 1991) - Often sampling does not take place every year, sometime there is no money for consecutive sampling - This method uses a new variable 'tau' which is the time difference between two consecutive sampling occassions. - Fits linear regression without intercept and uses process mean(slope of regression line) and process variance. --- `$$y_i= \frac{log(\frac{N_{t+1}}{N_t})}{\tau}$$` - lambda = (Nt+1/Nt) - x = sqrt(tau) #square root of tau - y = log(lambda)/x - mod.fit= lm(y~ 0+x) - summary(mod.fit) - mu = summary(au.fit)$coefficients[1] - r = mu + var(mod.fit$residuals)/2 --- #Doubling and tripling time - Doubling time = log(2)/r - Tripling time = log(3)/r - Halving time = log(0.5)/r