TSGFdoublelog {greenbrown}R Documentation

Temporal smoothing and gap filling using double logisitic functions


This function fills gaps and smoothes a time series by fitting for each year a double logisitic function. Two definitions for the shape of the double logistic function are available: 'Elmore' fits a function according to Elmore et al. (2012) and 'Beck' fits a according to Beck et al. (2006). If the time series has no Seasonality, double logistic fitting will not be performed but smoothing and interpolation will be done according to the selected backup algorithm.


TSGFdoublelog(Yt, interpolate = FALSE, method = c("Elmore", "Beck"), 
    backup = NULL, check.seasonality = 1:3, ...)



univariate time series of class ts.


Should the smoothed and gap filled time series be interpolated to daily values by using the logistic fit function?


Which kind of double logistic curve should be used? 'Elmore' (Elmore et al. 2012) or 'Beck' (Beck et al. 2006).


Which backup algorithm should be used for temporal smoothing and gap filling if the time series has no seasonality? If a time series has no seasonal pattern, the fitting of double logistic functions is not meaningful. In this case another method can be used. Default: NULL (returns NA - no smoothing), other options: "TSGFspline", "TSGFssa", "TSGFlinear"


Which methods in Seasonality should indicate TRUE (i.e. time series has seasonality) in order to calculate phenology metrics? 1:3 = all methods should indicate seasonality, Set to NULL in order to not perform seasonality checks.


further arguments (currently not used)


The function returns a gap-filled and smoothed version of the time series.


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


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.
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

FitDoubleLogBeck, FitDoubleLogElmore, TsPP, Phenology


# load a time series of NDVI (normalized difference vegetation index)

# introduce random gaps 
gaps <- ndvi
gaps[runif(100, 1, length(ndvi))] <- NA

# do smoothing and gap filling
tsgf1 <- TSGFdoublelog(gaps, method="Elmore")
tsgf2 <- TSGFdoublelog(gaps, method="Beck")
lines(tsgf1, col="red")
lines(tsgf2, col="blue")

# compare original data with gap-filled data
cols <- c("red", "blue")
all <- ts.union(ndvi, tsgf1, tsgf2)
all[!is.na(gaps),] <- NA
plot(all[,1], all[,2], col=cols[1], xlab="original", ylab="gap filled")
points(all[,1], all[,3], col=cols[2])
r <- c(cor(all[,1], all[,2], use="pairwise.complete.obs"), 
	cor(all[,1], all[,3], use="pairwise.complete.obs"))
lgd <- paste(c("Elmore Cor =", "Beck Cor ="), round(r, 3))
legend("topleft", lgd, text.col=cols)

[Package greenbrown version 2.4.3 Index]