We have a big problem conserning our panel data. When we xtset we get a problem of repeated time values within panel. As we are not able to just drop the data that has repeated time values we somehow need to add them togheter. We have now been browsing for several hours without finding any feasable solution. In short, some of the grocery stores we are analyzing have two observations per week for the same product. The code: drop if week == week[_n-1] solves the problem, but instead of dropping, we want to add another variable called "sales" if week == week[_n-1]. To specify we want to add the two sale observations for the same week together. The code should therefore look something like: "add sales if week = week[_n-1]". Hope this made sense, and thank you in advance.
-
Login or Register
- Log in with

Comment