Hi,
My variables' names are something like var11, var11_oth, var12, var12_oth, var13, var13_oth.etc... up to 12. All of variables ending with "_oth" are in string format; and the others are numeric values.
I want to create a new variable which is the sum of all numeric values only. My code was like:
egen=rowtotal (var*)
But it will include the string variables also.
Is there any other way of refering to numeric variables without typing one by one?
Thank you so much,
Lanna
Related Posts with Refer to multiple variables in Stata
Count how many variables have more than a certain number of missing valuesHi Statalists! I'm stuck on a very simple task: I would like to count how many variables in my datas…
Panel VARHello everyone. I am trying to apply a fixed effect estimation procedure on a panel var. The variabl…
What does Stata do with margins when using weighted least squares?I was surprised to find that, with weight (or aweight), margins does not seem to compute the average…
Genetic Matching packageAnalogously to the GenMatch package from R, is there any package in Stata that runs the Genetic Matc…
Filter households' data from a censusHi everyone! I'm working on my Master's thesis and I need help. I'm working with census data, and I …
Subscribe to:
Post Comments (Atom)
0 Response to Refer to multiple variables in Stata
Post a Comment