# How to find Trend of a Uni variate Time series?

3 views (last 30 days)
bushra raza on 15 Dec 2018
Commented: bushra raza on 19 Dec 2018
Hi,
I have time series data of maximum water level in cm on an hourly basis for a number of years 1961-2016. the data sets are categorized as observed set from water gauges and simulated data from some model. The observed data set has no missing value but there is a long range of data about 10 years having same negative value.(i dont know why? )should i consider it as NaN? I want to calculate the trend of these two uni variate time series? i also need to compare these two series? or one can say how well the simulated time series fit with observed time series?
i have converted my time series into timetable, then i compared them using cross correlation and Nash Sutcliffe coefficient.
tried to plot this data, as well. here is its plot. S1 is observed data plot, and S2 is Simulated data plot.
please guide me how can i find the trend of these series? observed data is attached for your convience. i am badly stuck after reading all helping texts in this regard?
dpb on 15 Dec 2018
There frankly doesn't appear to be any significant overall trend in those data...
Something is out of whack in a comparison since the mean of the second series is essentially 0 while ~500 for the measurements??
Clearly the measuring device was totally non-functional for a long period or somehow else the data file was corrupted. That section should clearly simply be ignored entirely as being meaningless.

Rick Rosson on 15 Dec 2018
Edited: Rick Rosson on 15 Dec 2018
Have you tried looking for patterns in the data by day of the week, hour of the day, month of the year, or whether the date is a holiday? Time series data often exhibits seasonality effects on different time scales depending on the nature of the observed phenomenum.
doc datetime
doc boxplot
doc scatter
doc histogram
bushra raza on 19 Dec 2018
Hi,
thank you Mr.Rick and @dpb
yes sir, there is a long gap of 10 years in data set. i had put forward a request to correct this gap or provide another data set.
in the meanwhile, i am working on the suggested options by Mr.Rick.

Rick Rosson on 16 Dec 2018
Another option is to look at the data in the frequency domain to estimate the relative significance of seasonality at different time scales.
doc fft
doc fftshift
doc abs
doc pwelch
doc spectrogram
bushra raza on 16 Dec 2018
thanx alot ,sir.
please let me try these options, then come back here.

### Categories

Find more on Time Series Events in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by