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
Questions about contour plotsI have three problems when plotting a contour graph in Stata 16.0 for Windows (revision 02 Jul 2019)…
How to calculate AIC(Akaike's information criterion) for restricted cubic splineI would like to calculate the AICs (Akaike's information criterion) to find out which one is more ap…
What model best suitable for data with dependent variable being a proportion with values from 0 to 1, both inclusive?Dear All, I have two questions on what models and Stata commands to use regarding the following two…
rewriting the codeI would like to calculate relative_all forecast accuracy and I intend to use the following code. How…
STATA Boot Camp?Hello Statalist, I was wondering if anyone knew of any stata boot camps where one could immerse the…
Subscribe to:
Post Comments (Atom)
0 Response to Finding sum per row based on conditions
Post a Comment