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
Heckman correction for hedonic regressionsHi everyone, using EHCP micro data, I am trying to predict the rent that households in social housin…
Using aextlogit with missing data and continous predictorsMy dataset has 995 adolescents who completed questionnaires over T=2 timepoints. I am focusing on ex…
Hirfindahl-Hirschman calculationHi Guys, For my research I need firm complexity as a control variable. The way in which well-known…
Generating group variables under changing group constellationHello Statalisters, I have a dataset with each row equaling one team member (see below). These team…
F statistics for excluded instruments after re ec2slsDear Statalisters, I am running Baltagi's ec2sls random effects model. xtivreg investment (favoriti…
Subscribe to:
Post Comments (Atom)
0 Response to Refer to multiple variables in Stata
Post a Comment