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
Choice of regression modelMy dependent variable is interval but bounded in the interval 5 to 80. All the values are known with…
Problem with bysort command as it is always showing not sorted!Dear Stata Members I would like to calculate the industry sales growth (isg) and following is my sam…
ivreg2 warning covariance matrix of moment conditions not of full rankDear Stata Users, I was trying to estimate an IV regression (2SLS) I have few dummies in my model, …
help on stacking matricesHi, Stata gurus, this seems to be easy, once with right Mata commands. I have N matrices, same num…
2SLS with we use polynomial terms of birth cohort.Hello, I am trying to estimate a fuzzy RD. Fuzzy RD is equivalent to 2SLS (Hahn et al. 2001). So I …
Subscribe to:
Post Comments (Atom)
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment