<?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 VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-VARCOMP-to-compute-expected-mean-squares-for-FIXED-effects/m-p/408346#M99650</link>
    <description>&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Dear SAS users,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;I want to compute "variance components" for &lt;/SPAN&gt;&lt;STRONG&gt;fixed&lt;/STRONG&gt;&lt;SPAN style="font-weight: 400;"&gt; effects in 2*3 Factorial Design.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Consider the battery life example in Montgomery`s (Design and Analysis of Experiments, 8th Edition, p. 187, 193):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;/* Montgomery, 8th ed., p. 187, 193 */&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA a;
       INPUT Material $ Temperature $ Hour;
       DATALINES;
               1 15 130
               1 15 155
               1 15 74
               1 15 180
               2 15 150
               2 15 188
               2 15 159
               2 15 126
               3 15 138
               3 15 110
               3 15 168
               3 15 160
               1 70 34
               1 70 40
               1 70 80
               1 70 75
               2 70 136
               2 70 122
               2 70 106
               2 70 115
               3 70 174
               3 70 120
               3 70 150
               3 70 139
               1 125 20
               1 125 70
               1 125 82
               1 125 58
               2 125 25
               2 125 70
               2 125 58
               2 125 45
               3 125 96
               3 125 104
               3 125 82
               3 125 60
       ;
       RUN;

PROC GLM DATA = a PLOTS = NONE;
       CLASS Material Temperature;
       MODEL Hour = Material | Temperature / SS3;
       OUTPUT OUT = a_ PREDICTED = Hour_predicted RESIDUAL = Hour_residuals STUDENT = Hour_residuals_Student;
       RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Above I use PROC GLM, but&lt;/SPAN&gt;&lt;A href="https://onlinecourses.science.psu.edu/stat502/node/154" target="_blank"&gt; &lt;SPAN style="font-weight: 400;"&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; PROC MIXED is implemented. (But I can not see the difference.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA = a METHOD = TYPE3;
       CLASS Material  Temperature;
       MODEL Hour = Material | Temperature;
       RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Then I try PROC VARCOMP to compute expected means squares:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS EXCLUDE ClassLevels NObs DepVar;
PROC VARCOMP METHOD = TYPE1 DATA = a SEED = 1;
  CLASS Material Temperature;
  MODEL Hour = Material | Temperature / FIXED = 3;
  RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Here is the output:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot-2017-10-29 SAS Studio.png" style="width: 562px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16275i2778E8122668AA1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot-2017-10-29 SAS Studio.png" alt="Screenshot-2017-10-29 SAS Studio.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;The following is what I found out by googling (yet I appreciate your hint on a good source).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_varcomp_sect020.htm" target="_blank"&gt;&lt;SPAN style="font-weight: 400;"&gt;Here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; it is said that "The "Q" notation in the expected mean squares refers to a quadratic form in parameters of the parenthesized effect." As far as I understand "quadratic form" refers to "squared form" (i.e. a&lt;/SPAN&gt;&lt;STRONG&gt;^2&lt;/STRONG&gt;&lt;SPAN style="font-weight: 400;"&gt;). Plus&lt;/SPAN&gt;&lt;A href="http://www.stat.ncsu.edu/people/dickey/courses/st512/lab11/11bnotes.html" target="_blank"&gt; &lt;SPAN style="font-weight: 400;"&gt;this&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; review additionally explains a bit what "Q" stands for. Specifically: "SAS... [uses] the Q(~) notation in place of the coeff*Kappa^2 term". The author mentions that at the final step of &amp;nbsp;determining EMS's for balanced designs the Sigma^2 is replaced by Kappa^2 (if I'm right the Sigma^2 = Var(Error) = 675.21296 in the example).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;But despite the information for me it is still unclear how to calculate EMS. Are the components in the parentheses equal to those in the equations listed on p.191 in the Montgomery's textbook? Is the Sigma^2 equal to variance of residuals?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;As far as I understand SAS can easily compute MSE for &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN style="font-weight: 400;"&gt;random &lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN style="font-weight: 400;"&gt;effects. But in case of fixed ones ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Oct 2017 13:35:31 GMT</pubDate>
    <dc:creator>stan</dc:creator>
    <dc:date>2017-10-29T13:35:31Z</dc:date>
    <item>
      <title>PROC VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-VARCOMP-to-compute-expected-mean-squares-for-FIXED-effects/m-p/408346#M99650</link>
      <description>&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Dear SAS users,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;I want to compute "variance components" for &lt;/SPAN&gt;&lt;STRONG&gt;fixed&lt;/STRONG&gt;&lt;SPAN style="font-weight: 400;"&gt; effects in 2*3 Factorial Design.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Consider the battery life example in Montgomery`s (Design and Analysis of Experiments, 8th Edition, p. 187, 193):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;/* Montgomery, 8th ed., p. 187, 193 */&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA a;
       INPUT Material $ Temperature $ Hour;
       DATALINES;
               1 15 130
               1 15 155
               1 15 74
               1 15 180
               2 15 150
               2 15 188
               2 15 159
               2 15 126
               3 15 138
               3 15 110
               3 15 168
               3 15 160
               1 70 34
               1 70 40
               1 70 80
               1 70 75
               2 70 136
               2 70 122
               2 70 106
               2 70 115
               3 70 174
               3 70 120
               3 70 150
               3 70 139
               1 125 20
               1 125 70
               1 125 82
               1 125 58
               2 125 25
               2 125 70
               2 125 58
               2 125 45
               3 125 96
               3 125 104
               3 125 82
               3 125 60
       ;
       RUN;

PROC GLM DATA = a PLOTS = NONE;
       CLASS Material Temperature;
       MODEL Hour = Material | Temperature / SS3;
       OUTPUT OUT = a_ PREDICTED = Hour_predicted RESIDUAL = Hour_residuals STUDENT = Hour_residuals_Student;
       RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Above I use PROC GLM, but&lt;/SPAN&gt;&lt;A href="https://onlinecourses.science.psu.edu/stat502/node/154" target="_blank"&gt; &lt;SPAN style="font-weight: 400;"&gt;here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; PROC MIXED is implemented. (But I can not see the difference.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA = a METHOD = TYPE3;
       CLASS Material  Temperature;
       MODEL Hour = Material | Temperature;
       RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Then I try PROC VARCOMP to compute expected means squares:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS EXCLUDE ClassLevels NObs DepVar;
PROC VARCOMP METHOD = TYPE1 DATA = a SEED = 1;
  CLASS Material Temperature;
  MODEL Hour = Material | Temperature / FIXED = 3;
  RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Here is the output:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot-2017-10-29 SAS Studio.png" style="width: 562px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16275i2778E8122668AA1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot-2017-10-29 SAS Studio.png" alt="Screenshot-2017-10-29 SAS Studio.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;The following is what I found out by googling (yet I appreciate your hint on a good source).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_varcomp_sect020.htm" target="_blank"&gt;&lt;SPAN style="font-weight: 400;"&gt;Here&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; it is said that "The "Q" notation in the expected mean squares refers to a quadratic form in parameters of the parenthesized effect." As far as I understand "quadratic form" refers to "squared form" (i.e. a&lt;/SPAN&gt;&lt;STRONG&gt;^2&lt;/STRONG&gt;&lt;SPAN style="font-weight: 400;"&gt;). Plus&lt;/SPAN&gt;&lt;A href="http://www.stat.ncsu.edu/people/dickey/courses/st512/lab11/11bnotes.html" target="_blank"&gt; &lt;SPAN style="font-weight: 400;"&gt;this&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-weight: 400;"&gt; review additionally explains a bit what "Q" stands for. Specifically: "SAS... [uses] the Q(~) notation in place of the coeff*Kappa^2 term". The author mentions that at the final step of &amp;nbsp;determining EMS's for balanced designs the Sigma^2 is replaced by Kappa^2 (if I'm right the Sigma^2 = Var(Error) = 675.21296 in the example).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;But despite the information for me it is still unclear how to calculate EMS. Are the components in the parentheses equal to those in the equations listed on p.191 in the Montgomery's textbook? Is the Sigma^2 equal to variance of residuals?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;As far as I understand SAS can easily compute MSE for &lt;/SPAN&gt;&lt;I&gt;&lt;SPAN style="font-weight: 400;"&gt;random &lt;/SPAN&gt;&lt;/I&gt;&lt;SPAN style="font-weight: 400;"&gt;effects. But in case of fixed ones ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2017 13:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-VARCOMP-to-compute-expected-mean-squares-for-FIXED-effects/m-p/408346#M99650</guid>
      <dc:creator>stan</dc:creator>
      <dc:date>2017-10-29T13:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC VARCOMP to compute expected mean squares for FIXED effects in 3*3 Factorial design</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-VARCOMP-to-compute-expected-mean-squares-for-FIXED-effects/m-p/408352#M99652</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;As far as I understand "quadratic form" refers to "squared form" (i.e. a&lt;/SPAN&gt;&lt;STRONG&gt;^2&lt;/STRONG&gt;&lt;SPAN style="font-weight: 400;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;No, a quadratic form is a &lt;EM&gt;sum of squares&lt;/EM&gt;, not a "squared form". As far as I know, there is no "kappa squared" in ANOVA.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;See if this document is helpful. It specifically covers the case of a two-way ANOVA with fixed effects.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-weight: 400;"&gt;&lt;A href="http://www.plantsciences.ucdavis.edu/agr205/Lectures/2011_Transp/T10_MixModels.pdf" target="_blank"&gt;http://www.plantsciences.ucdavis.edu/agr205/Lectures/2011_Transp/T10_MixModels.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2017 16:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-VARCOMP-to-compute-expected-mean-squares-for-FIXED-effects/m-p/408352#M99652</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-10-29T16:24:24Z</dc:date>
    </item>
  </channel>
</rss>

