<?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 REG output a specific F-test in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691429#M210439</link>
    <description>&lt;P&gt;You could get that test by rescaling v3:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_in_2;
set test_in;
v3_myVar = v3 / myVar;
run;

proc reg noprint data=reg_in_2 outest=reg_out ;
  	model dep = v1 v2 v3_myVar v4;
  	by group_id myvar;
  	t1: test v3_myvar + v4 =0;
	ods output ParameterEstimates=PE TestANOVA=TA;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Datasets PE and TA will contain the estimates and test results and also the value of myvar so that you can recalculate the v3 statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(untested)&lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2020 22:42:00 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-10-13T22:42:00Z</dc:date>
    <item>
      <title>PROC REG output a specific F-test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691392#M210423</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm doing a regression by groups. For each regression, I'm also doing an F-test. I encounter two problems with the F-test.&lt;/P&gt;&lt;P&gt;First, the F-test will be v3 * myvar + v4 =0, where myvar also varies for each group.&lt;/P&gt;&lt;P&gt;Second, how can I output the F-test to the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write the following code, but it didn't work...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg noprint data=reg_in outest=reg_out ;
  	model dep = v1 v2 v3 v4;
  	by group_id myvar;
  	t1: test v3*myvar+v4 =0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2020 20:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691392#M210423</guid>
      <dc:creator>jl2978</dc:creator>
      <dc:date>2020-10-13T20:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REG output a specific F-test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691423#M210435</link>
      <description>&lt;P&gt;The TEST statement has to include variables in the model. It cannot include variables in a BY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although you could re-parameterize the whole thing to get a model that is equivalent to having MYVAR in a BY statement, I still don't think you use the TEST statement in the way you want. I think you can test constant*v3+v4=0, but I don't think you can test something like variable1*variable2+variable3 = 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 22:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691423#M210435</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-13T22:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REG output a specific F-test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691429#M210439</link>
      <description>&lt;P&gt;You could get that test by rescaling v3:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_in_2;
set test_in;
v3_myVar = v3 / myVar;
run;

proc reg noprint data=reg_in_2 outest=reg_out ;
  	model dep = v1 v2 v3_myVar v4;
  	by group_id myvar;
  	t1: test v3_myvar + v4 =0;
	ods output ParameterEstimates=PE TestANOVA=TA;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Datasets PE and TA will contain the estimates and test results and also the value of myvar so that you can recalculate the v3 statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(untested)&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 22:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REG-output-a-specific-F-test/m-p/691429#M210439</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-10-13T22:42:00Z</dc:date>
    </item>
  </channel>
</rss>

