I have a code :
where I am attempting to produce rolling regressions at daily intervals every 6 months for 18 years. However, when I see the results, each coefficient I see is the same for each day for each of the 6 month periods, even though the smb variable changes every day. Is this code correct for what I am trying to achieve, which is to regress each x variable on smb in 6 month increments- I am doing this so I can see those that have negative coefficients in that interval (not the entire 18 years), so I can use these variables only.
Code:
foreach v of var x1-x30 { 2. rangestat (reg) `v' smb , interval(mdate 0 5) 3. rename reg_nobs nobs_`v' 4. rename b_smb coef_`v' 5. drop reg_* b_* se_* 6. }
Comment