<?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: Simple main effect code in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474605#M24693</link>
    <description>&lt;P&gt;it's useful to look at the L matrix coefficients when writing out the coefficients for the contrast: &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect011.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect011.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in glimmix i believe you just use E option on the model statement &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001411.htm#statug.glimmix.gmxmode" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001411.htm#statug.glimmix.gmxmode&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 23:43:06 GMT</pubDate>
    <dc:creator>pau13rown</dc:creator>
    <dc:date>2018-06-29T23:43:06Z</dc:date>
    <item>
      <title>Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474573#M24692</link>
      <description>&lt;P&gt;Hello. I have certain pairs that I am interested in comparing as post-hoc tests after finding significant interaction or main effects of Phoneme_stress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case of significant interaction of &lt;SPAN&gt;Phoneme_stress*Phase_info1&lt;/SPAN&gt;, I want to examine:&lt;/P&gt;
&lt;P&gt;simple main effects of&amp;nbsp;&lt;SPAN&gt;Phoneme_stress at Phase_info1=1 &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;simple main effects of&amp;nbsp;Phoneme_stress&amp;nbsp;at Phase_info1=3.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case of insignificant interaction and significant main effect of Phoneme_stress, I want to examine:&lt;/P&gt;
&lt;P&gt;Marginal comparison of Phoneme_stress in the following comparisons only:&lt;/P&gt;
&lt;P&gt;Phoneme_stress=0 vs. Phoneme_stress=2,&lt;/P&gt;
&lt;P&gt;Phoneme_stress=0 vs. Phoneme_stress=3,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phoneme_stress=0 vs. Phoneme_stress=4,&lt;/P&gt;
&lt;P&gt;Phoneme_stress=0 vs. Phoneme_stress=5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me modify below codes to meet my goal?&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Linda&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=a1.prediss1 plots=residualpanel(conditional marginal);
	class phase_info1 Phoneme_stress subject;
	model ResidualError_Sum= phase_info1|Phoneme_stress/solution dist=gamma;
	output out=a1.predata pred=pred resid=r;
	random intercept phase_info1 Phoneme_stress/ subject=subject;
	slice phase_info1*Phoneme_stress / sliceby=Phoneme_stress diff alpha=.0125;
	lsmeans Phoneme_stress/diff alpha=.0125;
	lsmestimate phase_info1*Phoneme_stress

		"Phoneme_stress: 0 v 2" 1 -1 0 0 0;
	"Phoneme_stress: 0 v 3" 1 0 -1 0 0;
	"Phoneme_stress: 0 v 4" 1 0 0 -1 0;
	"Phoneme_stress: 0 v 5" 1 0 0 0 -1;
	/ adjust=simulate(seed=29847);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 20:22:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474573#M24692</guid>
      <dc:creator>nlpurumi</dc:creator>
      <dc:date>2018-06-29T20:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474605#M24693</link>
      <description>&lt;P&gt;it's useful to look at the L matrix coefficients when writing out the coefficients for the contrast: &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect011.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect011.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in glimmix i believe you just use E option on the model statement &lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001411.htm#statug.glimmix.gmxmode" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_a0000001411.htm#statug.glimmix.gmxmode&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 23:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474605#M24693</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-06-29T23:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474624#M24695</link>
      <description>&lt;P&gt;How many levels does phase_info1 have?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many levels does phoneme_stress have?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How many levels are there for the interaction of phase_info1 and phoneme_stress?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you read the documentation for the LSMESTIMATE statement, and if the documentation is not quite enough information, have you read&amp;nbsp;&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;?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The order of coefficients in the LSMESTIMATE statement corresponds to the order depicted in the LSMEANS output for phase_info1 * phoneme_stress; the order is determined by the order of factors in the CLASS statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can always check the results of the LSMESTIMATE statement by hand using the pertinent estimates reported by the LSMEANS statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 03:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474624#M24695</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-30T03:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474715#M24703</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21514iF1963E186EE00785/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;You mentioned that I can calculate the difference by hand, but I thought I could read in the difference from the estimate column.&lt;/P&gt;&lt;P&gt;For example, the DV in phase_info1=1 is higher by 0.4988 than phase_info 1=2.&lt;/P&gt;&lt;P&gt;Was I wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your advice in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jun 2018 23:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474715#M24703</guid>
      <dc:creator>nlpurumi</dc:creator>
      <dc:date>2018-06-30T23:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474719#M24704</link>
      <description>&lt;P&gt;My point is that you can check the syntax of any LSMESTIMATE statement by computing its corresponding contrast by hand using the estimates reported by LSMEANS statements. (It's harder to hand-compute the contrast SE, so we let LSMESTIMATE do that for us.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the&amp;nbsp;contrast is not complicated--for example, the pairwise comparisons of main effect means for Phase_Info1 in your table--then you&amp;nbsp;do not need to use LSMESTIMATE statements and so you don't need to check whether you've specified the LSMESTIMATE statements correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 02:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474719#M24704</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-07-01T02:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474722#M24705</link>
      <description>&lt;P&gt;I see your point.&lt;/P&gt;&lt;P&gt;I came to ask different question, because the estimate value was different from what I obtained as difference value between two means from the descriptive stat table. Now, I have to admit how little I know about all these tools. I have no idea what that estimate is estimating.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your advice in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 02:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474722#M24705</guid>
      <dc:creator>nlpurumi</dc:creator>
      <dc:date>2018-07-01T02:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474726#M24706</link>
      <description>&lt;P&gt;I am not entirely sure where your confusion lies, but guessing here....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LSMEANS are not the same as MEANS in some situations. See&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glm_a0000000861.htm" target="_self"&gt;Means versus LS-Means&lt;/A&gt;.&amp;nbsp;If you are using descriptive statistics computed from the raw data (using something like the MEANS procedure), then model estimates will not match if the sample sizes differ (i.e., the design is unbalanced).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Descriptive statistics will also differ from model estimates if the response is transformed and the model estimates are subsequently back-transformed to the original scale, or the model is a generalized linear model and model estimates are inverse-linked to the original scale.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consequently, we need to have a certain amount of trust in the model because the model is often the best source of estimates, and&amp;nbsp;that requires that we&amp;nbsp;have a correctly specified model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 03:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474726#M24706</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-07-01T03:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474735#M24707</link>
      <description>&lt;P&gt;I see. That is good to know. So I will then report what appears as estimate as the difference value between two conditions rather than pure mean value I obtained from descriptive stat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I learn a lot from you. Thank you very much again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 03:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474735#M24707</guid>
      <dc:creator>nlpurumi</dc:creator>
      <dc:date>2018-07-01T03:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple main effect code</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474816#M24710</link>
      <description>&lt;P&gt;You would want to report the estimates of the means (and SEs) which you can obtain using LSMEANS, and not just differences between means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thought: Remember that GL(M)Ms report estimates &lt;EM&gt;on the link scale&lt;/EM&gt;. (Estimates on the inverse-link scale can be obtained using the ILINK option.) The gamma distribution uses as log link by default, so estimates of mean (and contrasts of means) are on the log scale. Those values would clearly be different than descriptive statistics computed on the raw data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 04:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simple-main-effect-code/m-p/474816#M24710</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-07-02T04:35:41Z</dc:date>
    </item>
  </channel>
</rss>

