Members,
I have a dataset with multiple columns (var1, var2, var3, etc.) with missing observations. Per row, I want to find the sum of the values for var1, var2, var3, etc. that come after a missing value. For instance, if var1 is missing, I would only take the sum of var2, var3, etc. If var2 is missing, I would only take the sum of var3, var4, etc.
I would appreciate any assistance with this!
Thanks,
A
Related Posts with Finding sum per row based on conditions
Creating categories and line plotsI would like to create 3 categories -- US, Non-US, and Non-US Developed -- using the variable countr…
ARDL short run and long run InterpretationHi everyone, This is the first time I use Stata for my paper so I am confused a lot. I’m doing my re…
Appending datasets by keeping the common variabels onlyHi, I want to append datasets for various countries, each of which contains variables that others do…
Can I have two lines and one histogram in the same graph?Hi all, I would like to draw a graph with three information: 1. Age on y-axis(1) 2. Gender on y-axi…
Main effect omitted as it is time-invariant. Is including the interaction without the main effect an issue?I am interested in the impact of Unemployment (U) on Gross Domestic Product (GDP). I also want to ch…
Subscribe to:
Post Comments (Atom)
0 Response to Finding sum per row based on conditions
Post a Comment