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?
Binscatter2 - faster, enhanced binned scatterplots in StataHi all, I wanted to make note of a program that I've had available on GitHub for a while now to gen…
Extracting a specific part of a string if the string contains an exact syntaxOK, so I'm not explaining this very well but here is what I want to do. I have data as shown below. …
How does one put formatted date labels into excel with Putexcel?*Hi there, Here's my code: local vars "date" foreach pre in `vars'{ putexcel set "tabout/cleaning…
Proportional odd assumption for ordered logit regression in panel dataRespected sir, I am using xtologit command for ordered logit regression for panel data. My dependent…
How to solve autocorrelation and hetero ?I using xtserial and xttest3 What should I do to deal with autocorrelation and hetero ? My data have…
Subscribe to:
Post Comments (Atom)
0 Response to How can I replace missing state values on panel data?
Post a Comment