<?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: ADF test in output file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505543#M72790</link>
    <description>Hello Chris,&lt;BR /&gt;thank you very much, since I needed to run this a couple of thousand times I added on your suggestion a simple "printto" command so that I can divert this to a word file. So here is what worked and thanks again&lt;BR /&gt;&lt;BR /&gt;DATA t1;&lt;BR /&gt;INPUT variablex ;&lt;BR /&gt;DATALINES ;&lt;BR /&gt;1&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;10&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;0&lt;BR /&gt;8&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;options nonotes;&lt;BR /&gt;proc printto print='c:\sas\dd.doc' new;&lt;BR /&gt;run;&lt;BR /&gt;ods output adf=temp30;&lt;BR /&gt;&lt;BR /&gt;proc autoreg data=t1;&lt;BR /&gt;model variablex= / stationarity =(adf=3) ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Oct 2018 13:41:13 GMT</pubDate>
    <dc:creator>Dim13</dc:creator>
    <dc:date>2018-10-18T13:41:13Z</dc:date>
    <item>
      <title>ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505264#M72784</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;first time asking question in forum.&amp;nbsp; I wanted to ask if there is a way I can run a test for Unit roots and keep the ADF test in a file rather than the output window (i.e. in the work folder- preferably the p-value).&amp;nbsp; A "noprint" option would also be nice.&amp;nbsp; Thanks a lot&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:19:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505264#M72784</guid>
      <dc:creator>Dim13</dc:creator>
      <dc:date>2018-10-17T18:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505271#M72785</link>
      <description>&lt;P&gt;Is this from PROC AUTOREG?&amp;nbsp; The MODEL statement has a NOPRINT option, and the proc has an OUTPUT option.&amp;nbsp; Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc autoreg data = gnp;
   model y = / stationarity =(adf =3) NOPRINT;
   output out=out1; /* specify option for specific values to save */ 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_autoreg_sect035.htm" target="_self"&gt;Lifted/adapted code from this example&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 18:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505271#M72785</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-10-17T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505426#M72788</link>
      <description>Thank you for the reply. This command solves the "noprint" option but it does not produce the Adf statistic in the out1 file. Moreover, none of the available options in the output statement (&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_autoreg_sect017.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_autoreg_sect017.htm&lt;/A&gt; ) of the "proc autoreg" procedure write the adf in a file.&lt;BR /&gt;For example , in the following mock data&lt;BR /&gt;&lt;BR /&gt;DATA t1;&lt;BR /&gt;INPUT variablex ;&lt;BR /&gt;DATALINES ;&lt;BR /&gt;1&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;10&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;0&lt;BR /&gt;8&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;proc autoreg data=t1;&lt;BR /&gt;model variablex= / stationarity =(adf=3) noprint;&lt;BR /&gt;output out=t2;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;the adf test without the "noprint" command is (with trend) -1.2062 with a p-value of 0.8276. It is these values that I need to add in a file (the tau value and the pr&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Oct 2018 04:38:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505426#M72788</guid>
      <dc:creator>Dim13</dc:creator>
      <dc:date>2018-10-18T04:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505509#M72789</link>
      <description>&lt;P&gt;You can get the values by using ODS OUTPUT.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, enable ODS TRACE to learn the name of the table you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run PROC AUTOREG&amp;nbsp;&lt;STRONG&gt;without&lt;/STRONG&gt; the NOPRINT option.&amp;nbsp; In the log you'll find:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Output Added:
-------------
Name:       ADF
Label:      Augmented Dickey-Fuller Tests
Template:   ets.autoreg.ADF
Path:       Autoreg.Model1.OLSEst.TestingForStationarity.ADF
-------------&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From this, we know the ODS table we want is "ADF".&amp;nbsp; Add the ODS OUTPUT statement&amp;nbsp;before your PROC AUTOREG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output adf=adf_out;
proc autoreg data=t1;
model variablex= / stationarity =(adf=3) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Resulting data set:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adfout.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24129iDE5DADC787287CC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="adfout.png" alt="adfout.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because this relies on ODS, and the NOPRINT option would suppress the ODS output, you can't include the NOPRINT option on the MODEL statement.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 12:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505509#M72789</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-10-18T12:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505543#M72790</link>
      <description>Hello Chris,&lt;BR /&gt;thank you very much, since I needed to run this a couple of thousand times I added on your suggestion a simple "printto" command so that I can divert this to a word file. So here is what worked and thanks again&lt;BR /&gt;&lt;BR /&gt;DATA t1;&lt;BR /&gt;INPUT variablex ;&lt;BR /&gt;DATALINES ;&lt;BR /&gt;1&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;10&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;0&lt;BR /&gt;8&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;options nonotes;&lt;BR /&gt;proc printto print='c:\sas\dd.doc' new;&lt;BR /&gt;run;&lt;BR /&gt;ods output adf=temp30;&lt;BR /&gt;&lt;BR /&gt;proc autoreg data=t1;&lt;BR /&gt;model variablex= / stationarity =(adf=3) ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Oct 2018 13:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/505543#M72790</guid>
      <dc:creator>Dim13</dc:creator>
      <dc:date>2018-10-18T13:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/648161#M78664</link>
      <description>&lt;P&gt;Hi Chris,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just used your code to output out the ADF test, which works very well. I did the same for Phillips Perron test (change adf ==&amp;gt; pp) but it just does not work. Can you please advise me on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 20:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/648161#M78664</guid>
      <dc:creator>rosiecao2509</dc:creator>
      <dc:date>2020-05-15T20:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: ADF test in output file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/648207#M78667</link>
      <description>&lt;P&gt;Different tests use different output tables in ODS.&amp;nbsp; &lt;A href="https://go.documentation.sas.com/?docsetId=etsug&amp;amp;docsetTarget=etsug_autoreg_details58.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;The names are documented here for PROC AUTOREG.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So change the ODS OUTPUT to:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;ods output PhilPerron=pp_out;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 23:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ADF-test-in-output-file/m-p/648207#M78667</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-05-15T23:14:52Z</dc:date>
    </item>
  </channel>
</rss>

