0
$\begingroup$

I have some data points at a daily level for the past 1 year. For each month, I need to identify which week has the most and increasing and most decreasing trend. To determine the trend, I am using Linear regression to fit a line to it and using the slope.

Now I want to explain how the data has increased changed in that week.

I was considering (last day - first day)/(first day) to get a change percentage, but it causes issues in weeks which start and end at 0, but have larger values on the other days.

What other methods can I use, that also considers all the points in the week.

$\endgroup$
0

1 Answer 1

0
$\begingroup$

I would regress the values based on weekday index grouped by a week variable and without an intercept, with this you can get an estimated trend for each week (which is not based on just the first and last value) and does not have issues with zeros. If you want a relative measure you could try estimating a correlation coefficient for each week.

$\endgroup$
2
  • $\begingroup$ I am new to this, so have a few questions. How do I use the correlation coefficient to find the relative measure? $\endgroup$ Commented Jan 12, 2023 at 3:17
  • $\begingroup$ @BBloggsbott In that case you do not need a linear model, you can just compute the correlation coefficient for each week, values vs weekdays, that's it. $\endgroup$ Commented Jan 12, 2023 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.