tsreg: Monitor post-disturbance regrowth

Description Usage Arguments Value Author(s) See Also Examples

Description

Structural monitoring method for post-disturbance forest regrowth in a time series

Usage

1
2
3
4
tsreg(x, change, h, dates = NULL, type = c("irregular", "16-day"),
  startOffset = 0, formula = response ~ harmon, order = 1,
  history = "BP", level = 0.05, w = 3, s = 1, plot = FALSE,
  ylabs = c("data", "|MOSUM|"))

Arguments

x

Time series. Can be an object of type numeric (vector), zoo or ts

change

Numeric. Date of original disturbance. See bfastmonitor for a potential method to determine this on a time series.

dates

Date. Vector with length length(x) with observation dates. If omitted, x will simply be an ordered series with arbitrary (regularly spaced) dates

startOffset

Numeric. Number of (decimal) years by which to offset the start of the regrowth monitoring process. Can also be set to "floor", in which case the floor of the change date will be taken as the start of the monitoring period.

formula

Formula to be fit to stable history period (see bfastmonitor)

order

Numeric. Order of the harmonic term of formula (see bfastmonitor)

history

Method or pre-determined period to use for history model (see bfastmonitor)

level

see bfastmonitor

w

Numeric. Number of years before a regrowth flag is allowed to be assigned.

plot

Logical. Plot the results?

ylabs

Character. Vector of length 2 with y labels of the data time series and MOSUM plots, respectively

Value

object of class tsreg

Author(s)

Ben DeVries

See Also

regSpatial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(ndmi)
plot(ndmi, type='b', cex=0.5)

# breakpoint detection with bfastmonitor
x <- bfastts(ndmi, time(ndmi), type="irregular")
bfm <- bfastmonitor(x, start=c(2005, 1), formula=response~harmon, order=1, plot=TRUE)

reg <- tsreg(ndmi, change = bfm$breakpoint, h = 0.5, plot = TRUE)
print(reg)

reg2 <- tsreg(ndmi, change = bfm$breakpoint, startOffset = "floor", h = 0.5, plot = TRUE)
print(reg2)

reg3 <- tsreg(ndmi, change = bfm$breakpoint, startOffset = "floor", h = 0.5, history='all', plot=TRUE)
print(reg3)

reg4 <- tsreg(ndmi, change = bfm$breakpoint, startOffset = "floor", h = 0.5, history='all', s=0, plot=TRUE)
print(reg4)

bendv/rgrowth documentation built on May 12, 2019, 10:58 a.m.