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
Dropping individuals when missing observations and change in variableHi, I am running panel data analysis in Stata and work with Survey data from Germany. The period co…
Code that picks up sudden spikes in prices Code: * Example generated by -dataex-. To install: ssc install dataex clear input double op …
Converting CSV file to Excel and then uploading it into Stata formathttps://www.eia.gov/beta/internation...=2014&end=2016 Hi, I would like to convert the above fi…
Creating a variable containing number of decimal points of another variable's valuesHi, I have a variable measuring speed. The values are double and vary in the number of decimal point…
regression on filtered dataIs there any disadavntage associated with the filtered regression wherein you you have filtered the …
Subscribe to:
Post Comments (Atom)
0 Response to Identify where in variable list a certain value appears
Post a Comment