Hi! My goal is to find out how many questions were asked that received non-null responses before a particular question of interest. This will vary by each submission in my survey since different respondents will give null responses to different questions/skip different questions. In order to do this, I have a name of a variable stored as a local as well as a unique ID for each submission stored as a local. I want to go into another dataset, narrow down the dataset by querying using unique ID for each submission, further narrow down the dataset by removing columns that have null responses, and find out where in the order of all the variables that have non-null responses this particular variable lies. This means I need to be able to loop through the column names themselves as opposed to the content of the columns. How do I do that? Thank you very much for your help!
Related Posts with Looping through column names as opposed to content of columns
How to draw ln(odds) against category?Hello everyone, This is my data. Chlordecone level category Total births Preterm births No prete…
Loop Encode but ignore "."Hello, I have a dataset with ~881k observations and 621 variables that I'm just beginning to clean.…
graph save errorThe following example in Stata 16.1 on a PC and Stata 12.1 on a Mac produces the same error: Code:…
How to rank the values of all variables to one id in one year for panel data? Many thanks! Code: * Example generated by -dataex-. To install: ssc install dataex clear input float id double y…
Difference in differences in Panel StructureHello everyone, My data set contains 63 teachers (i) from 20 schools in a panel data format with T=…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through column names as opposed to content of columns
Post a Comment