Generic function to predict the pdf (probability density function) of continuous (e.g. size) stage at t+1 given stage at t and a growth object.
Usage
growth(size, sizeNext, cov, growthObj)
Arguments
size
vector of current sizes.
sizeNext
vector of sizes in the next time-step.
cov
a data-frame with one row containing all covariates for this time-step.
growthObj
a growth object.
Details
Models defining continuous (size) stage at t+1, or growth increment, or log growth increment are defined; with various
underlying statistical models allowing decreasing variance in size, etc.
Value
a vector of length sizeNext giving the pdf (probability density function) of each value of sizeNext.
Author(s)
C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.
References
Easterling, Ellner & Dixon. 2000. Size-specific sensitivity: a new structured population model. Ecology 81, p694-708.
See Also
surv, growSurv
Examples
dff <- generateData()
gr1 <- makeGrowthObj(dff)
sizeRange <- c(1:20)
sizeInit <- 1
growth(sizeInit, sizeRange, data.frame(cov=1), gr1)
plot(growth(sizeInit, sizeRange, data.frame(cov=1), gr1), type="l",
col = "dark gray", xlab = "Continuous (e.g. size) stage at time t+1",
ylab = paste("Probability of growth to a specific size in t+1 from size ",
sizeInit, " at time t"))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(IPMpack)
Loading required package: Matrix
Loading required package: MASS
Loading required package: nlme
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IPMpack/growth.Rd_%03d_medium.png", width=480, height=480)
> ### Name: growth
> ### Title: Estimates growth probabilities.
> ### Aliases: growth
>
> ### ** Examples
>
> dff <- generateData()
> gr1 <- makeGrowthObj(dff)
> sizeRange <- c(1:20)
> sizeInit <- 1
> growth(sizeInit, sizeRange, data.frame(cov=1), gr1)
[1] 3.685982e-01 2.727676e-01 8.442867e-02 1.093061e-02 5.919113e-04
[6] 1.340683e-05 1.270145e-07 5.033126e-10 8.342186e-13 5.783349e-16
[11] 1.677013e-19 2.034000e-23 1.031865e-27 2.189538e-32 1.943299e-37
[16] 7.214132e-43 1.120176e-48 7.275211e-55 1.976344e-61 2.245624e-68
> plot(growth(sizeInit, sizeRange, data.frame(cov=1), gr1), type="l",
+ col = "dark gray", xlab = "Continuous (e.g. size) stage at time t+1",
+ ylab = paste("Probability of growth to a specific size in t+1 from size ",
+ sizeInit, " at time t"))
>
>
>
>
>
> dev.off()
null device
1
>