Description Usage Arguments Value Author(s) References See Also Examples
This function fits a double logistic curve to observed values using the function as described in Elmore et al. (2012) (equation 4).
1 2 3 4 5 |
x |
vector or time series to fit |
t |
time steps |
tout |
time steps of output (can be used for interpolation) |
hessian |
compute standard errors of parameters based on the Hessian? |
plot |
|
ninit |
number of inital parameter sets from which to start optimization |
... |
further arguments (currently not used) |
The function returns a list with fitted values, parameters, fitting formula and standard errors if hessian
is TRUE
Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]
Elmore, A.J., S.M. Guinn, B.J. Minsley and A.D. Richardson (2012): Landscape controls on the timing of spring, autumn, and growing season length in mid-Atlantic forests. - Global Change Biology 18, 656-674.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # select one year of NDVI data
x <- as.vector(window(ndvi, start=c(1991,1), end=c(1991, 12)))
plot(x)
# fit double-logistic function to one year of data
fit <- FitDoubleLogElmore(x)
fit
plot(x)
lines(fit$predicted, col="blue")
# do more inital trials, plot iterations and compute parameter uncertainties
FitDoubleLogElmore(x, hessian=TRUE, plot=TRUE, ninit=1000)
# fit double-logistic function to one year of data,
# interpolate to daily time steps and calculate phenology metrics
tout <- seq(1, 12, length=365) # time steps for output (daily)
fit <- FitDoubleLogElmore(x, tout=tout)
plot(x)
lines(tout, fit$predicted, col="blue")
PhenoDeriv(fit$predicted, plot=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.