Apologies if this is a basic question.
I am looking at time series and modelling data on sales in different regions. Some of the regions have yearly data while others offer quarterly breakdown of sales.
I want to make sure I can compare the slopes in a meaningful way so was planning to run the analyses on the quarterly data (if available) and rescale the time variable to estimate change in sales by year (to compare the slopes with region with quarterly data). For peace of mind, I then compared the results when using data collapsed at year level. The results are different!
I am not sure where I am going wrong!
I provide some simplified code based on available data for reference. Can anyone spot where I am going wrong?
Code:
clear use http://www.stata-press.com/data/r16/friedman2.dta g year = yofd(dofq(time)) keep if year>=1980 g timen=_n regress consump timen * Rescale time for yearly estimate replace timen=timen/4 regress consump timen * Analyses on year data collapse (sum) consump, by(year) g timen=_n regress consump timen
Comment