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
Generating risk-adjusted hospital admission rates using Empirical Bayes Means with melogitDear Statalisters, I am using -melogit- to compare hospital admission rates between 177 public hosp…
How to replace the age and exit at a certain ageDear All, Is there a way I can replace all age with the current age+1 till 2040 at one go and also …
Problem with xlabel's sizeHi Statalisters, Using the dataset shown at the bottom, I have created the following plot which is s…
When do I use GMM style instruments in a panel Vector Autoregression model?Dear all, I am applying a panel Vector Autoregression model using the command pvar from Abrigo and …
Descriptive statistics with confidence intervalI wonder in order to have descriptive statistics with confidence interval, whether the data has to b…
Subscribe to:
Post Comments (Atom)
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment