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
Missing categories in newly created categorical variableHi Statalist. I have found that after creating a new categorical variable that not all categories a…
Fixed effects code in a regressionDear Everyone, I would like to know if my code is correct. I am doing a regression (DiD) where I ha…
xtpoisson with exposure(varname): how to select the appropriate varname?I'm working on a paper with count data and am using a panel Poisson regression model (xtpoisson). I…
Drop or Keep Observations by titleDear Researchers, hope everyone blessed with healthy life. I've a column (in Excel) with different …
Merging databasesHi there, I really appreciate any help you can offer me. Basically I have a relational database iss…
Subscribe to:
Post Comments (Atom)
0 Response to Finding sum per row based on conditions
Post a Comment