BeckFit: A function to fit a double logisitic function to a vector...

Description Usage Arguments Details Value Author(s) References Examples

Description

This function fits a double logistic curve to observed values using the function as described in Beck et al. (2006) (equation 3). It can also provide and uncertainty estimation. Rather internal function. See greenProcess

Usage

1
2
BeckFit(ts, uncert = FALSE, nrep = 100, ncores='all', 
sf=quantile(ts, probs=c(0.05, 0.95), na.rm=TRUE))

Arguments

ts

A ts or zoo object with gcc data. index(ts) must be numeric days of year (doys) or a POSIXct vector

uncert

Should uncertainty be estimated?

nrep

Number of relications to estimate uncertainty, defaults to 1000.

ncores

Number of processors to be used in parallel computation, defaults to 'all' which will accidentally slow down any other activity on your computer. Otherwise set the number of processors you want to use in parallelization.

sf

Scaling factors required to normalize the data prior to the fitting. If the function is called by e.g. greenProcess sf is automatically calculated.

Details

The function estimates parameters of the double logistic equation from Beck et al. 2006 and provides an uncertainty estimation. Parameters are estimated by a call to the function FitDoubleLogBeck from the greenbrown package. Uncertainty is computed by adding noise to the raw data and by estimating again the parameters. Noise is added according to the standard deviation of the residuals (fitted - observed). The procedure is repeated nrep times.

Value

A list containing the following items.

fit

A list as returned by the function FitDoubleLogBeck

uncertainty

A list containing a zoo data.frame with the uncertainty predicted values, and a dataframe containing the respective uncertainty curve parameters

Author(s)

Gianluca Filippa <gian.filippa@gmail.com>

References

Beck, P.S.A., C. Atzberger, K.A. Hodga, B. Johansen, A. Skidmore (2006): Improved monitoring of vegetation dynamics at very high latitudes: A new method using MODIS NDVI. - Remote Sensing of Environment 100:321-334.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(zoo)
data(bartlett2009.filtered)
## fit without uncertainty estimation
fitted.beck <- BeckFit(bartlett2009.filtered)
days <- as.numeric(format(index(bartlett2009.filtered), '
plot(days, bartlett2009.filtered)
lines(fitted.beck$fit$predicted, col='red')
## look at fitting parameters
fitted.beck$fit$params
## look at fitting equation, where t is time
fitted.beck$fit$formula

## End(Not run)

phenopix documentation built on May 2, 2019, 4:50 p.m.