<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Counting variables of specified by user input in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167507#M8740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to create a macro function that counts the number of missing values for a user-specified set of variables within a user-specified data set. I have written the basic procedure to count missing values for a set of variables. I’m using a data step and just keeping the variable I want to count using the keep statement. What I’d really like to do is have the list of variables in the keep statement as a list which is defined elsewhere. I’ve looked at using a variable list but this seems to rely on using some sort of structured nomenclature which is not present in the variable lists I’ll want to pass.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Dec 2013 12:40:33 GMT</pubDate>
    <dc:creator>jbd13</dc:creator>
    <dc:date>2013-12-09T12:40:33Z</dc:date>
    <item>
      <title>Counting variables of specified by user input</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167507#M8740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to create a macro function that counts the number of missing values for a user-specified set of variables within a user-specified data set. I have written the basic procedure to count missing values for a set of variables. I’m using a data step and just keeping the variable I want to count using the keep statement. What I’d really like to do is have the list of variables in the keep statement as a list which is defined elsewhere. I’ve looked at using a variable list but this seems to rely on using some sort of structured nomenclature which is not present in the variable lists I’ll want to pass.&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 12:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167507#M8740</guid>
      <dc:creator>jbd13</dc:creator>
      <dc:date>2013-12-09T12:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Counting variables of specified by user input</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167508#M8741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many variables are you trying to pass?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on actual results needed you might be able to simplify using Proc means or summary to count missing. If something like this works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=have;&lt;/P&gt;&lt;P&gt;var &amp;lt;variables go here&amp;gt;;&lt;/P&gt;&lt;P&gt;output out=want nmiss=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Then a macro variable or parameter may work.&lt;/P&gt;&lt;P&gt;let varlist = age height weight dob;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc summary data=have;&lt;/P&gt;&lt;P&gt;var &amp;amp;varlist;&lt;/P&gt;&lt;P&gt;output out=want nmiss=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 18:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167508#M8741</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-12-09T18:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting variables of specified by user input</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167509#M8742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah great, that works!&lt;/P&gt;&lt;P&gt;I want to have the option to pass between 5 and 10 variables - I didn't realise you could define a macro variable as a list like that so was facing the same problem using proc summary.&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 09:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167509#M8742</guid>
      <dc:creator>jbd13</dc:creator>
      <dc:date>2013-12-10T09:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Counting variables of specified by user input</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167510#M8743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please mark the question as answered?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 09:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Counting-variables-of-specified-by-user-input/m-p/167510#M8743</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-12-10T09:25:24Z</dc:date>
    </item>
  </channel>
</rss>

