<?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 glm: estimate and contrast in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-estimate-and-contrast/m-p/273549#M14399</link>
    <description>&lt;P&gt;The best place to start is &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_introcom_sect033.htm" target="_self"&gt;the documentation of the ESTIMATE statement.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Since you are just getting started, you might want to read&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/351-2011.pdf" target="_self"&gt;CONTRAST and ESTIMATE Statements Made Easy:The LSMESTIMATE Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also recommend&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/269-2010.pdf" target="_self"&gt;Practicalities of Using ESTIMATE and CONTRAST Statements&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2016 10:03:21 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-05-27T10:03:21Z</dc:date>
    <item>
      <title>proc glm: estimate and contrast</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-estimate-and-contrast/m-p/273483#M14397</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following&amp;nbsp;SAS codes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=dataset1; by d1; run;&lt;/P&gt;
&lt;P&gt;proc glm data=dataset1; &lt;BR /&gt;&amp;nbsp; &amp;nbsp;class f1 f2; &lt;BR /&gt;&amp;nbsp; &amp;nbsp;by d1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;model dep = indep1 indep2&amp;nbsp;f1 f2&amp;nbsp;/solution;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;estimate 'test' indep1&amp;nbsp;1 -1 indep2 1 -1;&lt;BR /&gt;run; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm trying to do is a fixed effect regression, with f1 and f2 being the fixed effect, indep1 and indep2 being the independent variables. I also want to do the regression for two sub-samples: those with d1=1, and those with d1=0.&amp;nbsp;d1&amp;nbsp;is a dummy variable that equals 1 for half the dataset,&amp;nbsp;and 0 for the other half.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is two sets of regression results. One set is for those observations with d1=1, and the other for those with d1=0.&lt;/P&gt;
&lt;P&gt;I want to test the following two hypotheses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;beta1 in group (d1=1)=beta1 in group (d1=0), beta1 being the coefficient of indep1;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;beta2 in group (d1=1)=beta2 in group (d1=0), beta2 being the coefficient of indep2;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For each set of output, I got one&amp;nbsp;'test' results, with different t-values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the log file, I also got the error message " More coefficients than levels specified for effect indep1. Some coefficients will be ignored", "&lt;SPAN&gt;&amp;nbsp;More coefficients than levels specified for effect &lt;/SPAN&gt;&lt;SPAN&gt;indep2&lt;/SPAN&gt;&lt;SPAN&gt;. Some coefficients will be ignored&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm just beginning to learn to use estimate and/or contrast statements. So below are my questions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;a. what is the difference between&amp;nbsp;estimate and contrast statement? When should I use estimate, and when contrast?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;b. How can I correctly&amp;nbsp;&lt;/SPAN&gt;test the following two hypotheses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;beta1 in group (d1=1)=beta1 in group (d1=0), beta1 being the coefficient of indep1;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;beta2 in group (d1=1)=beta2 in group (d1=0), beta2 being the coefficient of indep2;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I've been googling a lot for this and didn't get the help I needed. So I'm hoping someone here could help me with this. Very much appreciated!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 04:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-estimate-and-contrast/m-p/273483#M14397</guid>
      <dc:creator>JOLSAS</dc:creator>
      <dc:date>2016-05-27T04:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc glm: estimate and contrast</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-estimate-and-contrast/m-p/273549#M14399</link>
      <description>&lt;P&gt;The best place to start is &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_introcom_sect033.htm" target="_self"&gt;the documentation of the ESTIMATE statement.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Since you are just getting started, you might want to read&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/351-2011.pdf" target="_self"&gt;CONTRAST and ESTIMATE Statements Made Easy:The LSMESTIMATE Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also recommend&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/269-2010.pdf" target="_self"&gt;Practicalities of Using ESTIMATE and CONTRAST Statements&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 10:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glm-estimate-and-contrast/m-p/273549#M14399</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-27T10:03:21Z</dc:date>
    </item>
  </channel>
</rss>

