My project involves data for internet search terms where I am trying to remove seasonal effects of these by regressing each word's log daily difference on the day of the week and month dummies. For all of my terms day, Saturday is omitted due to an issue of collinearity, and December is not included (This is my base but I want this to be included in the table so I can keep its residual). I want to keep the residual for each word as a new column in my data (new variable) so I can use this further but I am also unsure how to do this.
This is my regression for all 50 words:
foreach var of varlist ldiffcost_w-ldiffexpense_w {
regress ldiff`var'_w ib12.month ib7.month, robust
}
This is my regression for all 50 words:
foreach var of varlist ldiffcost_w-ldiffexpense_w {
regress ldiff`var'_w ib12.month ib7.month, robust
}
Comment