<?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 Scientific notation in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Scientific-notation/m-p/26291#M4264</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to use the ODS without any luck in trying to get something printed in scientific notation.  I'm using the PROC MIXED to do some regressions and I would like the p-value (ProbF) from the Tests3 table printed as scientific notation instead of &amp;lt;.0001.&lt;BR /&gt;
&lt;BR /&gt;
I just can't seem to figure out how to use the PROC TEMPLATE and ODS commands in the proper order to generate the output I need. I'm just going to post a small snippet of code I have and hope that someone could point me in the right direction.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
--------------&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS nocenter nodate;&lt;BR /&gt;
PROC template;&lt;BR /&gt;
        edit Stat.Mixed.Tests3;&lt;BR /&gt;
                edit ProbF; format=E12.; end;&lt;BR /&gt;
        end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
DATA ILMN_10002;&lt;BR /&gt;
INPUT @1 rs11152550 $2. @4 rs2228431 $2. @7 rs3747393 $2. @10 rs3747394 $2. @13 rs5939319 $2. @16 rs5982868 $2. @19 rs5982926 $2. @22 score 15.13 @38 sample $3. @42 sex $1. @44 year $4. @49 treatment $4. ;&lt;BR /&gt;
DATALINES;&lt;BR /&gt;
GG AA TT AA GG TT GG  9.180736541748 506 1 1981 dex&lt;BR /&gt;
AA AA CC GG GG TT GG  9.238666534424 507 1 1949 dex&lt;BR /&gt;
GG AA TT AA GG CC GG  8.720795313517 508 1 1946 dex&lt;BR /&gt;
GG AA TT AA GG TT GG 10.428975741069 509 2 1938 dex&lt;BR /&gt;
etc ....&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
ODS listing close;&lt;BR /&gt;
PROC MIXED DATA=ILMN_10002;&lt;BR /&gt;
        CLASS sample rs11152550 treatment;&lt;BR /&gt;
        MODEL score=rs11152550 treatment ;&lt;BR /&gt;
        REPEATED treatment / SUBJECT=sample TYPE=CS;&lt;BR /&gt;
        lsmeans rs11152550 ;&lt;BR /&gt;
        ods output Tests3 = tata;&lt;BR /&gt;
run;&lt;BR /&gt;
ODS listing;&lt;BR /&gt;
proc print data=tata;&lt;BR /&gt;
run;</description>
    <pubDate>Wed, 18 Jun 2008 15:46:17 GMT</pubDate>
    <dc:creator>Tony</dc:creator>
    <dc:date>2008-06-18T15:46:17Z</dc:date>
    <item>
      <title>Scientific notation</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Scientific-notation/m-p/26291#M4264</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to use the ODS without any luck in trying to get something printed in scientific notation.  I'm using the PROC MIXED to do some regressions and I would like the p-value (ProbF) from the Tests3 table printed as scientific notation instead of &amp;lt;.0001.&lt;BR /&gt;
&lt;BR /&gt;
I just can't seem to figure out how to use the PROC TEMPLATE and ODS commands in the proper order to generate the output I need. I'm just going to post a small snippet of code I have and hope that someone could point me in the right direction.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
--------------&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS nocenter nodate;&lt;BR /&gt;
PROC template;&lt;BR /&gt;
        edit Stat.Mixed.Tests3;&lt;BR /&gt;
                edit ProbF; format=E12.; end;&lt;BR /&gt;
        end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
DATA ILMN_10002;&lt;BR /&gt;
INPUT @1 rs11152550 $2. @4 rs2228431 $2. @7 rs3747393 $2. @10 rs3747394 $2. @13 rs5939319 $2. @16 rs5982868 $2. @19 rs5982926 $2. @22 score 15.13 @38 sample $3. @42 sex $1. @44 year $4. @49 treatment $4. ;&lt;BR /&gt;
DATALINES;&lt;BR /&gt;
GG AA TT AA GG TT GG  9.180736541748 506 1 1981 dex&lt;BR /&gt;
AA AA CC GG GG TT GG  9.238666534424 507 1 1949 dex&lt;BR /&gt;
GG AA TT AA GG CC GG  8.720795313517 508 1 1946 dex&lt;BR /&gt;
GG AA TT AA GG TT GG 10.428975741069 509 2 1938 dex&lt;BR /&gt;
etc ....&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
ODS listing close;&lt;BR /&gt;
PROC MIXED DATA=ILMN_10002;&lt;BR /&gt;
        CLASS sample rs11152550 treatment;&lt;BR /&gt;
        MODEL score=rs11152550 treatment ;&lt;BR /&gt;
        REPEATED treatment / SUBJECT=sample TYPE=CS;&lt;BR /&gt;
        lsmeans rs11152550 ;&lt;BR /&gt;
        ods output Tests3 = tata;&lt;BR /&gt;
run;&lt;BR /&gt;
ODS listing;&lt;BR /&gt;
proc print data=tata;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 18 Jun 2008 15:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Scientific-notation/m-p/26291#M4264</guid>
      <dc:creator>Tony</dc:creator>
      <dc:date>2008-06-18T15:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scientific notation</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Scientific-notation/m-p/26292#M4265</link>
      <description>Hi:&lt;BR /&gt;
  I think you may be editing the wrong template. It looks like Stat.Mixed.Test3 has this parent statement --       parent = Stat.Mixed.FTests; So, if you go look in Stat.Mixed.Test3, there is no ProbF column for you to edit...I'm guessing that your table template just ignores the edit statement for a column that it can't find in Stat.Mixed.Test3.&lt;BR /&gt;
&lt;BR /&gt;
  If you look inside the parent template, you do find a column for ProbF. So when I used the BP data set from a PROC MIXED example with THIS template definition (change Stat.Mixed.FTests and then change Stat.Mixed.Test3), I get the E notation used for the PROC MIXED results:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
               &lt;BR /&gt;
ods path work.templ(update)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
  &lt;BR /&gt;
PROC template;&lt;BR /&gt;
  edit stat.mixed.ftests;&lt;BR /&gt;
    edit ProbF; &lt;BR /&gt;
      format=E12.; &lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
        &lt;BR /&gt;
  edit Stat.Mixed.Tests3;&lt;BR /&gt;
    parent = Stat.Mixed.FTests;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
    &lt;BR /&gt;
ods select tests3;&lt;BR /&gt;
/*---Model 1, general linear model with clinics assumed to be&lt;BR /&gt;
     a fixed effect---*/&lt;BR /&gt;
proc mixed data=bp;&lt;BR /&gt;
   class trt visit complier clinic stratum;&lt;BR /&gt;
   model sbp = sbpbl trt&lt;BR /&gt;
      visit trt*visit&lt;BR /&gt;
      complier trt*complier &lt;BR /&gt;
      clinic trt*clinic &lt;BR /&gt;
      stratum trt*stratum;&lt;BR /&gt;
   repeated visit / type=vc sub=person;&lt;BR /&gt;
run;&lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
The results are:&lt;BR /&gt;
[pre]&lt;BR /&gt;
The Mixed Procedure&lt;BR /&gt;
             &lt;BR /&gt;
             Type 3 Tests of Fixed Effects&lt;BR /&gt;
          &lt;BR /&gt;
                 Num     Den&lt;BR /&gt;
Effect            DF      DF    F Value          Pr &amp;gt; F&lt;BR /&gt;
                 &lt;BR /&gt;
sbpbl              1      14      30.55     7.45540E-05&lt;BR /&gt;
trt                1      14       0.22     6.47256E-01&lt;BR /&gt;
visit              2      48       1.02     3.69462E-01&lt;BR /&gt;
trt*visit          2      48       0.09     9.13313E-01&lt;BR /&gt;
complier           1      14       7.83     1.42118E-02&lt;BR /&gt;
trt*complier       1      14       2.98     1.06204E-01&lt;BR /&gt;
clinic             3      14       8.88     1.51309E-03&lt;BR /&gt;
trt*clinic         3      14       2.28     1.24106E-01&lt;BR /&gt;
stratum            1      14       4.10     6.22769E-02&lt;BR /&gt;
trt*stratum        1      14       1.25     2.82631E-01&lt;BR /&gt;
                                                            &lt;BR /&gt;
[/pre]&lt;BR /&gt;
   &lt;BR /&gt;
What you'll find is that if you look in WORK.TEMPL template store, you'll have the parent template and the child template. Now, when you run your PROC MIXED, the change has been made to PROBF in the parent and so the child that's used for PROC MIXED had the E notation.&lt;BR /&gt;
 &lt;BR /&gt;
To return the ODS path to the usual PROC MIXED table templates, you would have:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods path sashelp.tmplmst(read);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                       &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 19 Jun 2008 04:45:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Scientific-notation/m-p/26292#M4265</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-06-19T04:45:03Z</dc:date>
    </item>
  </channel>
</rss>

