magnitude {strucchangeRcpp} | R Documentation |
Magnitudes of Breakpoints
Description
Computes magnitude statistics for breakpoints.
Usage
## S3 method for class 'breakpointsfull'
magnitude(object,
interval = 0.1, breaks = NULL, component = "trend", ...)
Arguments
object |
an object of class |
interval |
the (one-side) interval over which to compute the magnitude for the columns
|
breaks |
how many breaks to use or which statistic to use for estimating it,
see |
component |
which covariate(s) used for fitting the |
... |
ignored |
Details
The breakpoint magnitude is estimated using several statistics: the difference (diff) in the fitted value immediately before and after the break, and the root mean squared deviation (RMSD), mean absolute deviation (MAD) and mean deviation (MD) between the fitted values of the model preceding the break extrapolated over interval samples after the break, and vice versa. RMSD and MAD should be more robust estimators of magnitude compared to diff.
Value
A list with the following elements, compatible with the magnitude format as output by bfast
:
- Mag
a matrix containing the magnitude estimates (in columns) for each breakpoint (in rows),
- m.x
sample number at which the largest break was detected, twice
- y.x
fitted values before and after the largest break
- Magnitude
the maximum diff magnitude of the largest break
- Time
time of the largest break (same as
m.x
, but single value)
See Also
Examples
data(Nile)
trend <- 1:length(Nile)
bp.nile <- breakpoints(Nile ~ trend)
# The trend component is default, set "component" to the
# name of your coviariate(s), if it is different.
magnitude(bp.nile)