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.
Related Posts with Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Merging panel dataHi there, I have panel data with each survey providing multiple STATA datasets from that sweep. Eac…
IV Regression with fixed effects an three instrementsHello all, i am currently trying to run an iv regression with fixed effects. I need to instrument e…
Use Asrol and natural Log.Hi, I asked this question yesterday but it was not mentioned in the title so I followed the advice …
Making sure that histogram bin has more than 5 observations.I am working on a server with data on individuals, and there are very strict rules on how data shoul…
graph editor vs commandhi together i have following graph by command a b c d e 96 16 43 34 16 graph hbar (sum) a b c…
Subscribe to:
Post Comments (Atom)
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment