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
Combining Graphs using distplotDear Statalist, I was hoping to get some help on graph output. So I am reading this paper that show…
restricted mean survival time with stpm2_standsurvDear Paul Lambert, I have encountered the following error message after attempting to use the rmst …
How to print the help file in STATA with all the word retained?Hi all, When I try to print from STATA help file, I faced the problem of the word at the right part…
qui being ignored in xtgcauseWhen I run Code: qui xtgcause y z , lags(2) it does not run entirely quietly but displays yzyzid. I…
Help with labels on bar graphI am trying to create a horizontal bar graph grouped by categories. I wanted to add two labels to th…
Subscribe to:
Post Comments (Atom)
0 Response to Looping through column names as opposed to content of columns
Post a Comment