Weigthed Whittaker Smoother
smooth_wWHIT( y, w, ylu, nptperyear, wFUN = wTSM, iters = 1, lambda = 15, second = FALSE, ... )
y | Numeric vector, vegetation index time-series |
---|---|
w | (optional) Numeric vector, weights of |
ylu |
|
nptperyear | Integer, number of images per year. |
wFUN | weights updating function, can be one of 'wTSM', 'wChen' and 'wBisquare'. |
iters | How many times curve fitting is implemented. |
lambda | whittaker parameter (2-15 is suitable for 16-day VI). Multiple lambda values also are accept, then a list object return. |
second | If true, in every iteration, Whittaker will be implemented twice to make sure curve fitting is smooth. If curve has been smoothed enough, it will not care about the second smooth. If no, the second one is just prepared for this situation. If lambda value has been optimized, second smoothing is unnecessary. |
... | Additional parameters are passed to |
ws
: weights of every iteration
zs
: curve fittings of every iteration
Eilers, P.H.C., 2003. A perfect smoother. Anal. Chem. https://doi.org/10.1021/ac034173t
Frasso, G., Eilers, P.H.C., 2015. L- and V-curves for optimal smoothing. Stat. Modelling 15, 91-111. https://doi.org/10.1177/1471082X14549288
#> Error in library(phenofit): there is no package called ‘phenofit’#> Warning: data set ‘MOD13A1’ not found#> Error in tidy_MOD13(MOD13A1$dt): object 'MOD13A1' not foundd <- dt[site == "AT-Neu", ]#> Error in eval(expr, envir, enclos): object 'site' not found#> Error in check_input(d$t, d$y, d$w, nptperyear = 23): object 'd' not foundr_wWHIT <- smooth_wWHIT(l$y, l$w, l$ylu, nptperyear = 23, iters = 2)#> Error in smooth_wWHIT(l$y, l$w, l$ylu, nptperyear = 23, iters = 2): object 'l' not found