Sorry for the basic question.
I have a dataset with 100-variable list from v1-v100 with >10k observations. I would like to create a new column to indicate if a certain value is present for each observation and if it does, which variable this value belongs to.
For example, if the value of interest is "water", for observation #1, if "water" appears on v2, I would like to assign 2 for observation #1....
Any value appears only once in v1-v100, if any.
Thank you, everyone.
Related Posts with Identify where in variable list a certain value appears
calculating the number by comparing this period and previous periodDear All, Suppose that I have this data Code: * Example generated by -dataex-. To install: ssc inst…
Replace if value is a dateHi, I am trying to replace the value of one variable when the condition holds (the condition is that…
Extracting the Beta Coeff from regressionHello all, I am running a linear regression, with 2 sets of dummy variables age (25-65) and cohort(…
keep observations between staryear and endyear.Dear All, I have this dataset, Code: * Example generated by -dataex-. To install: ssc install datae…
Panel data graphHi. I need help. I want to make a graph with panel data, in which I must include the trend of the c…
Subscribe to:
Post Comments (Atom)
0 Response to Identify where in variable list a certain value appears
Post a Comment