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
xtreg, fe robust: xtoverid error(2b) operator invalid when correcting Hausman test (V_b-V_B is not positive definite) due to year dummiesDear Statalisters, I am analyzing a panel dataset with year dummies over a period of 2000-2018 and …
one year survival - data managementgood day all I have a list of children with 2 variables "date of birth" and "date of death". Both a…
Comparing two waves with RE-LogitI am currently using Panel data from the SOEP to analyze and compare political interest in 2013 and …
Medeff command: invalid mediate (error r(198))Dear Statalists, Could you please tell me the reason why when I type the following command: medeff…
Division into two groupsDear statalists, I am running an analysis with an unbalanced dataset for 10 years. I would like to …
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