Colleagues,
I have a dataset with a land-use description codified with a alphanumeric string. Some observations are the followings:
var1 value
R(60ECL(60VAP_20EDFea_10ZAU_10OCT)_40UEN(45VAP_20Z AU_20OCT_15EDFea)) 14
R(60IAS(70EDFnv_20ZAU_10VAP)_40UEN(60VAP_40EDFea)) 12
R(70ERG(60ZAU_15EDFea_15VAP_10OCT)_30EDU(40EDFea_2 5OCT_20VAP_15ZAU)) 46.5
R(90UCS(75EDFea_25VAP)_10ERG(45VAP_35EDFem_20ZAU)) 2
it contains different type of land-use described by letters and its percentages by number. in addition, a land can have two or more description and subdescriptions.
I want to calculate the total value of "ZAU" in each observation but i don´t know how to do that. the complete table has more than 500 observations so it could take me hours to calculate this value for each one. Does anyone have any idea how to do it?
Related Posts with How to calculate a value from a string
merge vars do not uniquely identify observations in master data - but no duplicates foundI am struggling to perform a 1:m merge on two merge variables that are both string variables. When I…
Panel Data: xttest2 errorHi, I am running a long panel (t=15, N=8), 8 countries and 15 years. after running for fe I ran the…
Multiple equation ordered model with random coefficients - CMP Roodman (2011)Hello Everyone: My question relates to estimating a bivariate ordered model with random coefficient…
Generate var3 for if var1>var2I am trying to make a new variable that shows if people have a higher value in one variable than ano…
Translating datasets from Russian to English languageHi All, I was wondering if there is any command in Stata 15 that could translate variables and valu…
Subscribe to:
Post Comments (Atom)
0 Response to How to calculate a value from a string
Post a Comment