Array
Hi,
I have a 2 year panel data, and I do not have stateside information for 2019. To match the states for both years, I run the following command:
bys id: gen st=state
bys id: replace st=state[_n+1] if year==2019
However, when I run the code, Stata replaces only 2 observations but not all. How can I fix my problem?
Thanks!
Related Posts with How can I replace missing state values on panel data?
putexcelDear All, I nested putexcel into a loop. I need to estimate the same model for 500 assets and i wou…
Combine histogram and connected line graph over timeDear Statalist forum users, I came across this graph in a published paper and want to produce a simi…
Cross sectional dependence for firm panel dataDo we conduct a cross sectional dependence test for panel data with N being listed firms and T being…
Keep variable1 if 1 observation per year OR*the minimum number for a variable2 if > 1 observations per yearNeed help! My goal is to write code to keep a single HbA1c value per year closest to each participan…
How to create new columns for each country observation and count this number of countries?Dear all, I wanted your help with the following. I am working on a patent project and in the follow…
Subscribe to:
Post Comments (Atom)
0 Response to How can I replace missing state values on panel data?
Post a Comment