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
PPML indexHi, I am using PPML for my gravity model. One of my independent variables is an index. How can I i…
Finding intersection of two lines with two y axesI am trying to find the intersection of two lines (of course I am just looking for the x coordinate …
Plotting confidence intervals for simple exponential smoothing forecast resultsHello, everyone! I am currently trying to visualise the results of a simple exponential smoothing f…
spatial autoregression (SAR) rho coefficientHi everyone, I am running a spatial autoregressive model (SAR) with stata commands spregress and sp…
Geometric mean with zeros and negative values Hi, I'm struggling with the geometric mean computation in the following case. I need to create com…
Subscribe to:
Post Comments (Atom)
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment