<?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: Proc Report: Across scattered in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665431#M198981</link>
    <description>&lt;P&gt;Your data structure is not the same as in the article, where they use a single variable for gender (not separate M and F).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the code in the paper,&amp;nbsp; I would suggest you reorganize your data in a longitudinal timeseries format, with a single variable representing week number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will also give you the flexibility to add additional weeks when needed.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jun 2020 18:40:52 GMT</pubDate>
    <dc:creator>ghosh</dc:creator>
    <dc:date>2020-06-26T18:40:52Z</dc:date>
    <item>
      <title>Proc Report: Across scattered</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665411#M198972</link>
      <description>&lt;P&gt;I am new to proc report. Using across to nest two variables together. However, all the results are not on the same row and are scattered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I have:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tpham_0-1593190652005.png" style="width: 677px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46699iFCD603B460EACECA/image-dimensions/677x203?v=v2" width="677" height="203" role="button" title="Tpham_0-1593190652005.png" alt="Tpham_0-1593190652005.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THis is my code and sample data structure&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Data have;
retain IGA group	Week1	Week2	CatC	CatN;;
length CatC $ 10.;
input IGA group	Week1	Week2	CatC $	CatN;
cards;
1	3	.	.	N	1
1	3	.	.	Mean	2
2 	3	1	1	N	1
2 	3	2.3	2.0	Mean	2
3	3	3	3	N	1
3	3	1.9	2.0	Mean	2
4	3	3	3	N	1
4	3	0.9	1.3	Mean	2
5	3	4	4	N	1
5	3	1.7	1.3	Mean	2
;

ods tagsets.rtf file="&amp;amp;path.\output\Draft\&amp;amp;pgm..rtf" style=rtfdef startpage=yes nogtitle nogfootnote;

proc report data=have nowindows headline headskip SPANROWS split='|' spacing=4 
	
		style(header)={ just=center asis=on} 
		style(column)={asis=on} 
		style(report)={width=9 in};

	column group CatN CatC (IGA, (Week1 Week2));

	define IGA/across order=data style(header)=[just=center fontweight=bold  asis=on] style(column)=[just=center asis=on];
		
	define group/order=data group "Age Group" style(header)=[just=left fontweight=bold  asis=on] style(column)=[just=left asis=on cellwidth=0.7in];

	define CatN/order=data noprint;
	define CatC /display 'Statistic' style(header)=[just=center fontweight=bold  asis=on] style(column)=[just=left asis=on cellwidth=0.7in];

	define Week1/display  style(header)=[just=center fontweight=bold  asis=on] style(column)=[just=center asis=on cellwidth=0.7in ];
	define Week2/display  style(header)=[just=center fontweight=bold  asis=on] style(column)=[just=center asis=on cellwidth=0.7in ];
	
run;

ods tagsets.rtf close;&lt;/PRE&gt;
&lt;P&gt;How do I get all N and mean to report on the same row across the IGA variable and weeks?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 16:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665411#M198972</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2020-06-26T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report: Across scattered</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665412#M198973</link>
      <description>&lt;P&gt;I found this article&amp;nbsp;&lt;A href="https://www.lexjansen.com/pharmasug/2012/TF/PharmaSUG-2012-TF20-SAS.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2012/TF/PharmaSUG-2012-TF20-SAS.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried the dummy variable method and that did not work.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 16:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665412#M198973</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2020-06-26T16:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report: Across scattered</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665430#M198980</link>
      <description>Closing this as I figured it out. The had to change week variable from display to analysis</description>
      <pubDate>Fri, 26 Jun 2020 18:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665430#M198980</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2020-06-26T18:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report: Across scattered</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665431#M198981</link>
      <description>&lt;P&gt;Your data structure is not the same as in the article, where they use a single variable for gender (not separate M and F).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the code in the paper,&amp;nbsp; I would suggest you reorganize your data in a longitudinal timeseries format, with a single variable representing week number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will also give you the flexibility to add additional weeks when needed.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 18:40:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-Across-scattered/m-p/665431#M198981</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-06-26T18:40:52Z</dc:date>
    </item>
  </channel>
</rss>

