FitDoubleLogElmore {greenbrown}R Documentation

Fit a double logisitic function to a vector according to Elmore et al. (2012)

Description

This function fits a double logistic curve to observed values using the function as described in Elmore et al. (2012) (equation 4).

Usage

FitDoubleLogElmore(x, t = 1:length(x), tout = t, hessian = FALSE, 
    plot = FALSE, ninit = 100, ...)

Arguments

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

plot iterations for logistic fit?

ninit

number of inital parameter sets from which to start optimization

...

further arguments (currently not used)

Value

The function returns a list with fitted values, parameters, fitting formula and standard errors if hessian is TRUE

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

References

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.

See Also

TSGFdoublelog, Phenology

Examples


# select one year of NDVi data
data(ndvi)
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)



[Package greenbrown version 2.4.3 Index]