I have a dataset that has data up to a certain year (2010). It's a panel data such that I have data of several firms from 2000 to 2010. I need to expand it and add 5 new rows after year 2010 (2011-2015) for each firm.
When I use expand 5 if year==2010, generate (original) all the new rows go to the end of dataset but I want to have 5 new rows for each firm. I tried bysort firmid : expand 5 if year==2010, generate (original) but I get the following error: expand may not be combined with by
What's my mistake?
Thanks
When I use expand 5 if year==2010, generate (original) all the new rows go to the end of dataset but I want to have 5 new rows for each firm. I tried bysort firmid : expand 5 if year==2010, generate (original) but I get the following error: expand may not be combined with by
What's my mistake?
Thanks
Comment