Hello, I'm a long-time lurker and first time poster.
I have a dataset in Stata with units (say, statefips codes) and dates at regular intervals (say, daily) and observations on variables X, Y, and Z.
I would like to extend my panel backwards in time T number of days, filling in the variables X, Y, and Z with 0 for all units. I have to do this many times, so manually inserting a first observation and then using carryforward could be prohibitively time consuming. Thank you.
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment