Questions tagged [trend]

A trend is the general drift or tendency in a set of data.

Trend in math is a mathematical tool used to show a pattern in the occurrence of data. An example would be; if a set of numbers in any given data increases and the values of the other set of numbers increases, then they are said to have a positive trend and vice versa. If the data shows no relation then the set shows no trend.

332 questions
5
votes
2 answers

Flatten or detrend a seasonal time series

I have a repeating time series with a seasonal (weekly) pattern, and I'd like to return the same time series with no week-over-week trend, taking the first value as a starting point. To be specific, the 1st value will still be 39.8, but the 8th…
Eric
  • 177
  • 1
  • 7
5
votes
3 answers

select range when value is higher than in previous value

How to get all records where value is higher than previous value. For example, first range in the table below start on id 1 and ends on id 6, next range is from 7 to 10, etc... id Open 1 1.30077 2 1.30088 3 1.30115 4 1.30132 5 1.30135 6 …
5
votes
6 answers

How to check if a sequence of numbers has a increasing/decreasing trend in C++

What's the best way to check if a sequence of numbers has an increasing or decreasing trend? I know that I could pick the first and last value of the sequence, and check their difference, but I'd like a somewhat more robust check. This means that I…
INElutTabile
  • 866
  • 2
  • 20
  • 38
4
votes
1 answer

How to make global variable in pinescript(Tradingview)

I am working on creating a trend indicator in tradingview to track which way the trend is going. Specifically, I want a variable that will stay the same over days, but when a certain condition is met it will change. It seems like it should be simple…
Jason Maynard
  • 359
  • 1
  • 3
  • 15
4
votes
1 answer

What is the difference between drift and trend in a time series?

I am analyzing a time series using the unit root test. I am stuck in that I do not understand the difference between trend and drift in the time series. Is it correct to say that trend is a feature of a time series, whose average changes over time…
Pietro
  • 347
  • 1
  • 3
  • 15
4
votes
2 answers

Define trend pandas/python

I have dataset: print (df['price']) 0 0.435 1 -2.325 2 -3.866 ... 58 -35.876 59 -37.746 Name: price, dtype: float64 moving average: m_a = df['price'].rolling(window=5).mean() m_a.plot() print(m_a) 0 NaN 1 NaN 2 …
goodw1n
  • 53
  • 1
  • 4
4
votes
0 answers

ARIMA trend = 'nc' or 'c' in python

I am trying to work with ARIMA forecasting for a TS that has trends and seasonality. Hence I decompose the data into residual+trend+seasonality. As I need to predict values out of sample, I am using exog=trend as input for the model and run…
user3861925
  • 713
  • 2
  • 10
  • 24
3
votes
3 answers

Finding p-value and z statistics along with the OLS Linear regression

I could find the coefficients and intercepts from linear regression but unable to find a suitable method to get p-value and z value for respective variable trend. Additionally, not able to find a method to save the output results in excel format.…
Lalantra
  • 67
  • 1
  • 11
3
votes
2 answers

Identify rows where a specific pattern change occurs

Introduction/background I am required to analyse respondent data in an spss data sheet but i believe it may be best to copy this data into excel or google sheets for this particular analysis I am about to describe. 600+ participants have been asked…
3
votes
1 answer

How to add a line of best fit (trendline) to a scatter plot in CanvasJS?

I have scatter graph which contains a lot of data, too much to display to a user. I would like to add a line of best fit or 'trendline' to the graph to show the trend and make the scatter plots invisible. My data is stored in an external JSON file…
user11333092
3
votes
2 answers

Subset vector based on increasing/decreasing trend

I have a vector in R defined as c(2,3,4,6,5,3,1,3,5,6). I want to subset the vector based on all increasing/decreasing trends in the vector. The desired output should be 3 sub vectors (in this example) 1) (2,3,4,6) 2) (6,5,3,1) 3) (1,3,5,6)
Prateek
  • 61
  • 6
3
votes
0 answers

Show trend on the grouped bar plot in ggplot

This is an extension of the already discussed question (I am copying the perfect data example and solution by jakub from https://stackoverflow.com/a/18162330 ) Data: raw <-…
J.Julian
  • 68
  • 6
3
votes
0 answers

Displaying datetime on a chart's x axis and subsequently on a tooltip showing x and y axis value

namespace TRSQL { public partial class Form1 : Form { System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); private ImageList imagelst; public SqlDataReader dr1; public Form1() { imagelst = new…
Astha
  • 31
  • 2
3
votes
0 answers

How can i extract trend words from given dataset (Java)?

I want result like Twitter Trends. From given dataset, i want to get most seen words. 2 or 3 words together. Actually i want exactly this result. So far i got most seen words from dataset with decreasing list of results. How can i modify this code…
Dohn Joe
  • 31
  • 3
3
votes
2 answers

Detrending data with nan value in scipy.signal

I have a time series dataset with some nan values in it. I want to detrend this data: I tried by doing this: scipy.signal.detrend(y) then I got this error: ValueError: array must not contain infs or NaNs Then I tried…
bikuser
  • 2,013
  • 4
  • 33
  • 57
1
2
3
22 23