getltrend | R Documentation |
This function detects a linear trend and returns it as a vector.
The time can be recognised if the signal is a time-serie object.
This function is a wrapper for gettrend()
.
getltrend(signal, time = NULL)
signal |
A vector or a time-serie object. Time-sorted values of signal containing trend. |
time |
A positive real number. Time span of the signal in base units. |
Returns an object of a class "trend" containing vector of values of the estimated trend.
The object also contains:
values |
original values of the signal |
detrended |
the difference between the original values of the signal and the trend |
time |
vector of the time domain of the signal |
model |
model used to predct trend for purpose of estimating the trend on new data |
gettrend()
, plot.trend()
, time.trend()
, detrended()
, orisignal()
, predict.trend()
x <- sin(seq(0, 6, length.out=100)) + rnorm(100) trend1 <- getltrend(x, time=1) detrended(trend1) predict(trend1, newtime=seq(1, 2, length.out=100)) data(austres) trend2 <- getltrend(austres) plot(trend2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.