Description Usage Arguments Details Value Author(s) Examples
bfm with automatic magn thresholding and re-monitoring
1 2 3 |
x |
Numeric. Time series vector |
dates |
Time (date) index of |
start |
Numeric. Start of monitoring period. See |
monend |
Numeric. Optional: end of the monitoring period. See |
magnThresh |
Numeric. Threshold for breakpoints. All breakpoints with magnitude < |
magnPeriod |
Numeric. Period of time (in years) from which to compute magnitude (as median of residuals) |
adjust |
Numeric. Delete all observations within this many years preceding a breakpoint, if that breakpoint has a magnitude less than |
verbose |
Logical. Display error messages (if any)? |
formula |
See |
order |
See |
returnBFM |
Logical. Return a regular |
... |
Arguments to pass to |
The magnitude is computed as the median of the residuals within the period magnPeriod
years after the break date. If this magnitude is greater than magnThresh
, all observations preceding the break date by adjust
years are deleted (including the observation at the break date), the start of the monitoring period is reset to the break date, the model is re-fit and monitoring continues until the end of the time series is reached, or a breakpoint with magnitude > magnThresh
is found.
The default value for magnPeriod
is 1, assuming that no follow-up land use or other dynamics take place within a 1-year period.
The amplitude of the fitted 1st order model can be computed by taking sqrt{harmoncos^2 + harmonsin^2}
Numeric vector with output: break date, magnitude, length of history period (in years), R-squared of fitted model, Adjusted R-squared of fitted model, Intercept of fitted model, cosine coefficient(s) (if applicable), sine coefficient(s) (if applicable), error flag (1 means an error was encountered in the try()
statement). If returnBFM
is FALSE
, a list with the above values as first item and a regular BFM object as second item is returned.
Ben DeVries
1 2 3 4 5 6 7 8 9 10 | library(bfmThresh)
data(tura)
s <- getSceneinfo(names(tura))
xy <- c(820692.4, 829564.4)
z <- zoo(tura[cellFromXY(tura, xy)][1, ], s$date)
z <- window(z, start = "1999-01-01")
bfm <- bfmThresh(z, dates = time(z), start = c(2005, 1), plot = TRUE)
print(bfm)
bfm2 <- bfmThresh(z, dates = time(z), start = c(2005, 1), magnThresh = -500, plot = TRUE)
print(bfm2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.