I come up with a regression model in Stata X=L7.X + S6.X where L7 is lags 7 and S6 is season 6 (day 6th in my daily data). We do not care about model output, my problem is the seasonality variable itself. When I'm trying to plug in numbers to do forecasting; however, I can not interpret S6.X properly and I don't know how Stata generates S6.X
Here are the detailed variables
What is the formula for S6.X so that I could manually calculate it ?
I've tried to ask ChatGPT and it comes up with the answer
Generate a quarterly seasonality variable gen time = _n gen S6.quarterly = sin((2*_pi()*time)/6)
But this formula will have value ranges from -1 to 1 but in my data it ranges from -2 to 2 so I might think it is not reliable.
How to manually calculate seasonality variable (start with S.) in Stata?