<?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: Missing issues in PROC REPORT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621685#M77238</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; The code posted&amp;nbsp; in the original question now runs fine. So either it was edited or your method of copying it messed it up.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Feb 2020 21:04:57 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2020-02-01T21:04:57Z</dc:date>
    <item>
      <title>Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621654#M77235</link>
      <description>&lt;P&gt;As provided below, my dataset includes two classification variables: class1 and class2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;24 observations exist.&lt;/P&gt;
&lt;P&gt;15 observations have a non-missing value of class1.&lt;/P&gt;
&lt;P&gt;20 observations have a non-missing value of class2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;13 observations have non-missing values of class1 and class2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run proc report as below, I would like to use 15 observations for the part of class1 and use 20 observations for the part of class2. But PROC REPORT uses the observations where there is no missing value of class1 and class 2. Is there a way to achieve what I describe? I just want to use the maximum sample for each variable, not the intersection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
	input ID year class1 class2 @@;
	datalines;
	1 2000	1	1
	2 2000	1	1
	3 2000	1	2
	4 2000	1	2
	5 2000	2	1
	6 2000	2	1
	7 2000	2	2
	8 2000	2	2
	9 2000	.	2
	10 2000	2	.
	11 2000	.	2
	12 2000	.	.

	1 2001	1	1
	2 2001	1	1
	3 2001	1	2
	4 2001	.	2
	5 2001	.	1
	6 2001	.	1
	7 2001	2	2
	8 2001	2	2
	9 2001	.	2
	10 2001	2	.
	11 2001	.	2
	12 2001	.	.
	;
	run;

proc means data= have; run;

proc report data= have;
	columns year class1 class2;
	define year / group ;
	define class1/ across; 
	define class2/ across;
	run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS results are as follows:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;class1&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;class2&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;year&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;1&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;2&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;1&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;2&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2000&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2001&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="left"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would like to have:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;class1&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;class2&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;year&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;1&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;2&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;1&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;2&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2000&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF6600"&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF6600"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2001&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF6600"&gt;3&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF6600"&gt;4&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD class="r data"&gt;&lt;FONT color="#FF6600"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 01 Feb 2020 17:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621654#M77235</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2020-02-01T17:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621669#M77236</link>
      <description>&lt;P&gt;Your DATA step code does not produce the correct data set. It looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-02-01 14_29_23-Window.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35799i3AAA23998EA7A27B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-02-01 14_29_23-Window.png" alt="2020-02-01 14_29_23-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please provide working code for this data set?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 19:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621669#M77236</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-01T19:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621684#M77237</link>
      <description>&lt;P&gt;If you add the MISSING option to the PROC REPORT statement then the observations with a missing value for one or more of the across variables will not be excluded.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data= have missing;
  columns year n,class1 n,class2;
  define year / group ;
  define class1/ across; 
  define class2/ across;
  define n / ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                         class1                           class2
       year          .          1          2          .          1          2
       2000          3          4          5          2          4          6
       2001          6          3          3          2          4          6&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 21:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621684#M77237</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-01T21:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621685#M77238</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; The code posted&amp;nbsp; in the original question now runs fine. So either it was edited or your method of copying it messed it up.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 21:04:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621685#M77238</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-01T21:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621689#M77239</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; The code posted&amp;nbsp; in the original question now runs fine. So either it was edited or your method of copying it messed it up.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well I beg to differ, I just pasted it into SAS Studio from here, and it sill doesn't give the desired data set. But I suppose its not really relevant now.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 21:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621689#M77239</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-01T21:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621694#M77240</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; The code posted&amp;nbsp; in the original question now runs fine. So either it was edited or your method of copying it messed it up.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well I beg to differ, I just pasted it into SAS Studio from here, and it sill doesn't give the desired data set. But I suppose its not really relevant now.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The editor in SAS/Studio does not handle text the way the normal SAS editor does.&amp;nbsp; For example if you open a file in the normal SAS editor that contains tabs and submit it the tabs are converted to spaces before it gets to the SAS parser.&amp;nbsp; &amp;nbsp;But in SAS/Studio the tabs will stay in the text sent to SAS to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you probably have embedded some tabs or some other strange characters by copying and pasting directly into the SAS/Studio editor tab in your browser.&amp;nbsp; It it is just tabs then try adding&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile cards expandtabs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to the data step.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 21:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621694#M77240</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-01T21:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Missing issues in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621703#M77241</link>
      <description>&lt;P&gt;Yes, that's it, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; . Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 22:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-issues-in-PROC-REPORT/m-p/621703#M77241</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-02-01T22:13:21Z</dc:date>
    </item>
  </channel>
</rss>

