<?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 Re: Evaluating a subset of Data in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837415#M36156</link>
    <description>&lt;P&gt;Is that RICAYN_DEC variable numeric?&amp;nbsp; That is what your WHERE statement is assuming.&lt;/P&gt;
&lt;P&gt;I would assume the variable is character given the other outputs you showed. The only way the values could print as YES and NO if it was numeric would be because it had a format attached to the variable that displayed those strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using the MISSING() function as that will work for both numeric and character variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC PRINT DATA=WORK.DS2; 
	VAR SUBNUM;
	WHERE missing(RICAYN_DEC);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Oct 2022 14:48:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-10-07T14:48:13Z</dc:date>
    <item>
      <title>Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837408#M36151</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset that includes all participants who have consented, reconsented and completed the study. I would like to look at only those subjects who reconsented and conduct some basic descriptive analysis on the sub-group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I ask for assistance as to what the code would look like in order for me to do this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what my dataset looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_Novice22_0-1665151806958.png" style="width: 486px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76015i6C036FC444E494F6/image-dimensions/486x124?v=v2" width="486" height="124" role="button" title="SAS_Novice22_0-1665151806958.png" alt="SAS_Novice22_0-1665151806958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I only want to look at all participants who have information in the RICAYN_DEC column and conduct some basic descriptive analysis including missing data etc.&lt;/P&gt;
&lt;PRE&gt;311  /* creating a seperate dataset - Re-consent Overall*/
312  PROC FREQ DATA=WORK.DS2;
313      TABLE RICAYN_DEC / OUT= RICAYN_DEC;
314  RUN;
&lt;/PRE&gt;
&lt;P&gt;The code above that I tried does not work. But this is not what I want. Because the missing is not accurately reflecting the missing for only the RICAYN_DEC sub-set. I am would like to look at this information in different ways.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_Novice22_1-1665152109424.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76016iAFF5EF43BCEC22D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAS_Novice22_1-1665152109424.png" alt="SAS_Novice22_1-1665152109424.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any assistance that you can provide to help me evaluate this sub-population would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;T.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837408#M36151</guid>
      <dc:creator>SAS_Novice22</dc:creator>
      <dc:date>2022-10-07T14:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837411#M36153</link>
      <description>&lt;P&gt;Follow-up email:&lt;/P&gt;
&lt;PRE&gt;PROC FREQ DATA=DS2;
  where PAGENAME="Re-consent";
  table RICAYN_DEC;
RUN;&lt;/PRE&gt;
&lt;P&gt;I figured out how to look at just this sub-set but how do I perform additional descriptive analyses?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_Novice22_0-1665153021872.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76017i1F5BFB5CFE21362B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAS_Novice22_0-1665153021872.png" alt="SAS_Novice22_0-1665153021872.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How would I look at just those missing ones? The code below does not work:&lt;/P&gt;
&lt;PRE&gt;TITLE "Missing Re-consent?"; 
PROC PRINT DATA=WORK.DS2; 
	VAR SUBNUM;
	WHERE RICAYN_DEC=.;
RUN;&lt;/PRE&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;T.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837411#M36153</guid>
      <dc:creator>SAS_Novice22</dc:creator>
      <dc:date>2022-10-07T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837412#M36154</link>
      <description>&lt;P&gt;What sort of descriptive analysis would you like to perform?&amp;nbsp; Maybe start with looking at PROC MEANS or PROC UNIVARIATE.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837412#M36154</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-10-07T14:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837414#M36155</link>
      <description>Hi Quentin!&lt;BR /&gt;What would that code look like? How would I incorporate that code into my existing code. Also, how do I look at just the 2 missing values?&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 07 Oct 2022 14:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837414#M36155</guid>
      <dc:creator>SAS_Novice22</dc:creator>
      <dc:date>2022-10-07T14:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837415#M36156</link>
      <description>&lt;P&gt;Is that RICAYN_DEC variable numeric?&amp;nbsp; That is what your WHERE statement is assuming.&lt;/P&gt;
&lt;P&gt;I would assume the variable is character given the other outputs you showed. The only way the values could print as YES and NO if it was numeric would be because it had a format attached to the variable that displayed those strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using the MISSING() function as that will work for both numeric and character variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC PRINT DATA=WORK.DS2; 
	VAR SUBNUM;
	WHERE missing(RICAYN_DEC);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837415#M36156</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-07T14:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837420#M36157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank for your help, unfortunately that did not work. Its providing all missing in that column as opposed to the 2 missing values in the subset.&lt;/P&gt;
&lt;P&gt;Any other ideas?&lt;/P&gt;
&lt;PRE&gt;414  TITLE "Missing Re-consent?";
415  PROC PRINT DATA=WORK.DS2;
416      VAR SUBNUM;
417      WHERE missing(RICAYN_DEC);
418  RUN;

NOTE: There were 338 observations read from the data set WORK.DS2.
      WHERE MISSING(RICAYN_DEC);
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.04 seconds
      cpu time            0.06 seconds
&lt;/PRE&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;T.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837420#M36157</guid>
      <dc:creator>SAS_Novice22</dc:creator>
      <dc:date>2022-10-07T15:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837423#M36159</link>
      <description>&lt;P&gt;Not sure what you are talking about. Are you looking to find the two observations with missing values identified by this code?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FREQ DATA=DS2;
  where PAGENAME="Re-consent";
  table RICAYN_DEC;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you need to include the test of the PAGENAME variable also.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC print DATA=DS2;
  where PAGENAME="Re-consent" and missing(RICAYN_DEC);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/837423#M36159</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-07T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating a subset of Data</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/838624#M36248</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;PRE&gt;TITLE "Missing Re-consent? VARIABLE"; 
PROC PRINT DATA=WORK.DS2; 
	VAR SUBNUM;
	WHERE missing(RICAYN_DEC) AND PAGENAME="Re-consent";
RUN;&lt;/PRE&gt;
&lt;P&gt;This is exactly correct.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;T.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Evaluating-a-subset-of-Data/m-p/838624#M36248</guid>
      <dc:creator>SAS_Novice22</dc:creator>
      <dc:date>2022-10-14T12:54:52Z</dc:date>
    </item>
  </channel>
</rss>

