dat: is a 2x2 matrix with the two time series. Each column correspond to the values at a given time.
smoothing_level: is a scalar between 0 and 1 that specifies the smoothing of the resulting time series tau.
lambda: Alternative, the function directly accepts the lambda value that corresponds to the desired smoothing level.
plot: is TRUE when we cant to plot of the original agaist the resulting series.
label: vector of characters that corresponds to the labels for each time point in the serie.
jump: is a vector of integers that specifies which values of labels should appear in the x labels.
las: is 1(2) if the x labels should be vertical (horizontal).
bands: is TRUE tolo include 95% confidence bands in the plots.
Returns
The smoothed series tau.
The orginal data dat.
The estimation for sigma_eta, sigma.eta
The length of the time series N.
The lambda value corresponding to the smoothing level.
The diagonal values of the estimated variance of tau, diag.var.tau
A flag that indicates if data is a bivariate time series.
Examples
# Employment in agriculture (\% of total employment) (modeled ILO estimate) in OCDE membersdata(emp_agr)#It is a ts object with one single time seriessts<-trend_estimate(emp_agr,0.70)plot_trend(sts, title="Employment in agriculture in OCDE members", xlab ="Years")# Data Trade (\% of GDP) for USA and Mexico downloaded fromdata(trade)#It is a numeric matrix with two columnssts<-trend_estimate(trade,0.7)plot_trend(sts, title="Trade in% of GDP",xlab="years")ts_trade<-ts(trade, start=1969,end=2017)#We transform tade to a ts objectsts<-trend_estimate(ts_trade,0.7)plot_trend(sts, title="Trade in% of GDP",xlab="years")