Hi Forum,
I am struggling with something very silly but would be very helpful if someone could help me out.
I have an id variable which identifies the product and the size (e.g Coca Cola 600 ml)
Since my analysis is to evaluate a policy impact, I want to make sure that for the same product I have observations for both years.
However, there are some products that I have N observations for one year and 0 for the other, which could bias my research.
I am trying to drop those products who do not have observations for both years so I can compare the changes between them
Any suggestions?
Many thanks!!
Best,
Lena
Related Posts with Matching observations across years for same id
keeping only some values from string variablesHi, I have a set of 24 variables reporting information for some treatments for a sample of patients.…
Summation by month + yearHi, I have converted a string variable called last_activity containing dates into a date formatted …
Difference-in-differences WITHOUT matched sampleHello helpful list, I have a sample of companies where each company was treated in a single year so…
Interaction effects and few cases at the ends of a distribution.Dear all, I am estimating a linear regression with an interaction effect between a continuous and a…
How to compute difference in years between daily dates?I have daily stock data, inputted and formatted properly for stata. I wish to calculate the return o…
Subscribe to:
Post Comments (Atom)
0 Response to Matching observations across years for same id
Post a Comment