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?
Spregress and esttabHello, I am working with spatial data and trying to export my estimation results from the spregress…
Issues with getting minimum date value in a data setHi there I'm having issues trying to identify the minimum value of date of dispensation for each dru…
Creating polynomials of unit specific time trends in an unbalanced panelDear Statalist-members, I have a bit of a beginner question: I have an unbalanced panel of several …
Appending ErrorsHello, I am trying to append several datasets together (yes they have been cleaned and are ready for…
Longitudinal data analysisI am analyzing a data set of before/after biomarker values in 2 groups. I have baseline continuous c…
Subscribe to:
Post Comments (Atom)
0 Response to How can I replace missing state values on panel data?
Post a Comment