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
Bar graph with confidence intervals and character group labelsSo this bothers me for a while. I want to have a bar graph for group means with confidence intervals…
Why the logical in Stata of calculating missing observation is quite strangeToday I calculate Code: gen year1a=1 if yr <=ei +1 While ei=. and yr=1990, I saw the result of …
how do do a rolling WLS in stataI would like to run a rolling regression in Stata, where in each window the weights of independent v…
Separating string variable with parenthesis and commasHello, I have variable that looks like Experience ('Santo Engineering', '2017-04-30', '2017-05-30'…
How to run a regression using weight by the number of children to each parentDear all, I want to examine the effects of children' s characteristics on their parent health outco…
Subscribe to:
Post Comments (Atom)
0 Response to Identify where in variable list a certain value appears
Post a Comment