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
Adding region fixed effects in ordered-probit estimation in a cross-section analysisMy dependent variable can take 3 distinct values so I am leaning towards using ordered-probit estima…
Bruteforcing regressionsFrom a set of about 300 variables, I've pared down to about 30 potential x variables. Assuming a lin…
How copy graphs to word? I see the button for "copy" the graph but could not paste it to word.I see the button for "copy" the graph but could not paste it to word since "paste" button in word is…
Using local macro to create 'blocks' of variables to be used in multivariable regression analysesDear Statalisters, There have been several parallel threads on using local macros to create lists of…
3SLS and Limited Dependent VariableHello, I'm trying to estimate a 3-equation model in which my first stage dependent variable is a co…
Subscribe to:
Post Comments (Atom)
0 Response to Refer to multiple variables in Stata
Post a Comment