i have panel time series.
I want to create a variable that is the difference between the last non-missing value and the first non-missing value.so in this case for Austria, the value would be -1 - 0 = "-1".
I want to know the simplest code. I have been creating a variable that is the last value, and another variable that's the first value, and blah blah but i need to do this for so many variables, so i would that'd be a one liner command or something?
thank you!
Related Posts with creating a variable that takes a value of the difference of the last non-missing value and the first non-missing value in panel data
egen newvar = group(oldvar), labelHi. I want to assign values to string data. Therefore I tried to convert the string var into a nume…
conformability error (503) in Synthetic control methodI am facing the issue of “conformability error (503)” while running the synth command in Stata 15.1.…
Error Running xtcsd testHi Dear, When I run xtcsd, pesaran after estimating fixed effects model in Stata.....I get the erro…
Hausman TestHello, This is my first post so forgive me if I explain anything wrong. I am currently running a pan…
define size dummy of cityDear All, the following question is from here (https://bbs.pinggu.org/forum.php?mod...=1#pid57703787…
Subscribe to:
Post Comments (Atom)
0 Response to creating a variable that takes a value of the difference of the last non-missing value and the first non-missing value in panel data
Post a Comment