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
Conditional logistic regressionHi! I am new to this forum and looking for some advice please. I have run a conditional logistic reg…
psmatch2 and pstestHallo, I have a question regard "psmatch2" and "pstest". I use the same propensity score, but i am …
Represent Table to Line graphGreetings. I would want to transform my tabulation: ta bdcategory year to be represented in a line g…
Creating variables that sum variables in regularly interspaced columnsHi, I would like to create a formula for making variables of the kind: gen newvar = v[k] + v[k+8] +…
Comparing mortality rate over yearsDear Statlisters, I am trying to find : whether there is a "significant change in the mortality rate…
Subscribe to:
Post Comments (Atom)
0 Response to Making a Balanced Panel Dataset in Stata 16 from (Almost) Scratch
Post a Comment