<?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 Proc mixed: formats of the output dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699706#M33745</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Proc mixed generates datasets where D8.4 implemented. Is there any way to switch this options off and see all figures? Besided further 'format _all_ informat _all_'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 826px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51782i7D8B1AEE2EA9A171/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 09:06:11 GMT</pubDate>
    <dc:creator>DmytroYermak</dc:creator>
    <dc:date>2020-11-18T09:06:11Z</dc:date>
    <item>
      <title>Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699706#M33745</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Proc mixed generates datasets where D8.4 implemented. Is there any way to switch this options off and see all figures? Besided further 'format _all_ informat _all_'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 826px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51782i7D8B1AEE2EA9A171/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 09:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699706#M33745</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-11-18T09:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699709#M33746</link>
      <description>&lt;P&gt;Show us your code please.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 09:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699709#M33746</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-11-18T09:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699723#M33747</link>
      <description>&lt;P&gt;Here it is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output lsmeans=lsmean diffs=dif;
proc mixed data = set  order=data;
	class X1 X2 X3 X4 ;
	model chg = X1 X3 X1*X3 base;
	repeated X3 / subject=X2 type=un;
	random intercept; 
	lsmeans X1*X3 / pdiff cl alpha=0.05;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 09:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699723#M33747</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-11-18T09:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699786#M33756</link>
      <description>&lt;P&gt;I don't know if result values can be reformatted within PROC MIXED.&amp;nbsp; I have always done the reformatting in a post processing DATA step. I know that might not be much help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 13:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699786#M33756</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-18T13:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699830#M33758</link>
      <description>&lt;P&gt;With that window open you can manually change the format, just type the one you want into the format or use the selection box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or Proc datasets can permanently change the format for any variable in place. The following pseudocode demonstrates how the change the format for the variable named Variable to newformat for the data set named Group in the library named Somelib.&lt;/P&gt;
&lt;PRE&gt;proc datasets library=somelib nolist;
   modify group;
      format variable newformat.;
 quit;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use the desired format in a procedure like proc print or report when viewing results.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699830#M33758</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T15:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699850#M33761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58513"&gt;@DmytroYermak&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to support &lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159" target="_blank" rel="noopener"&gt;Tom&lt;/A&gt;'s &lt;SPAN&gt;SASware ballot suggestion&lt;/SPAN&gt;&amp;nbsp;"&lt;SPAN&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-new-dataset-options-for-changing-variable-attributes-other/idi-p/673729" target="_blank" rel="noopener"&gt;Add new dataset options for changing variable attributes other than name.&lt;/A&gt;" Once this has been implemented you can specify different formats via a dataset option in the ODS OUTPUT statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Till then you can use &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=odsproc&amp;amp;docsetTarget=p0sb65h5ohot5ln1g7u6en2p71m9.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC TEMPLATE&lt;/A&gt; to modify the relevant ODS template(s) if you really want. I normally don't do this because I wouldn't want to accidentally damage the default templates. However, following&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=odsproc&amp;amp;docsetTarget=n0qdx09cku9vvcn1jucgb0idtap1.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Example 1: Editing a Table Template That a SAS Procedure Uses&lt;/A&gt; I (grown up with SAS 6, i.e. without ODS) felt comfortable enough to give it a try.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;Save a copy of SASHELP.TMPLSTAT (just in case). I copied all files named tmplstat*.sas7bitm found in the SASHELP library.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Submit&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods path show;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;SPAN&gt;&lt;SPAN&gt;to check where SAS would search for ODS templates and save new ones.&lt;BR /&gt;In my SAS session the result was:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;Current ODS PATH list is:

1. WORK.TEMPLAT(UPDATE)
2. SASUSER.TEMPLAT(READ)
3. SASHELP.TMPLMST(READ)&lt;/PRE&gt;
&lt;SPAN&gt;indicating that modified template definitions would be written to WORK.TEMPLAT, whereas the original templates would be read from SASHELP.TMPLMST (because I don't have the SASUSER.TEMPLAT store). But this may be different on your system, so you might need to submit an appropriate ODS PATH statement as suggested in the "Example 1" mentioned above.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Browse the original template: With activated Results window go (in the main menu) to View --&amp;gt; Templates --&amp;gt; Sashelp.Tmplstat --&amp;gt; Stat --&amp;gt; Mixed. Right-click on, say, LSMeans and select "Open" from the context menu. There it says (among a few other things, but not format specifications)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;parent = Stat.Mixed.tTests;&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;So, open tTests instead of LSMeans. There you see the specification&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;LI-CODE lang="markup"&gt;format = d8.4;&lt;/LI-CODE&gt;in various places, e.g., for lower and upper confidence limits (sections "define Lower" and "define Upper").&lt;/LI&gt;
&lt;LI&gt;Just as an example, I submitted the step&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
edit Stat.Mixed.tTests;

  edit lower;
    format=best24.;
  end;
  edit upper;
    format=best24.;
  end;

end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
And, indeed, a subsequent run of PROC MIXED including an LSMEANS statement with CL option delivered lower and upper confidence limits of least squares means with plenty of decimals. Also the corresponding variables Lower and Upper in the ODS output dataset had the BEST24. format instead of D8.4.&lt;/LI&gt;
&lt;LI&gt;Submit
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
delete Stat.Mixed.tTests;
run;&lt;/CODE&gt;&lt;/PRE&gt;
and everything is back to normal.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;That was interesting, but I still think that using a quick PROC DATASETS or DATA step to change the format would be easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/699850#M33761</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-11-18T15:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: formats of the output dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/700106#M33765</link>
      <description>&lt;P&gt;Thank you all for the detailed comments. In my case I have used a post processing re-formatting.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 06:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/700106#M33765</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2020-11-19T06:05:48Z</dc:date>
    </item>
  </channel>
</rss>

