<?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 mixed lsmeans with zero cell in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107361#M5670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to echo &lt;A __default_attr="178104" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;'s approach for using a means model.&amp;nbsp; We have used it quite successfully in modeling repeated measures data where treatments were applied for different lengths of time.&amp;nbsp; You will have to use ESTIMATE or LSMESTIMATE statements to get tests of main effects, but that is actually a good thing, and, in my opinion, much to be preferred to multiple imputation where the data are missing not at random.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Oct 2013 12:58:21 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2013-10-10T12:58:21Z</dc:date>
    <item>
      <title>Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107354#M5663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've run into a bit of an issue with proc mixed and I'm hoping someone here can help.&amp;nbsp; I'm using a repeated measures design to examine differences in a single measure in 5 treatment groups over 14 days.&amp;nbsp; I have a lot of missing data in the study, which is I'm using proc mixed.&amp;nbsp; This is all well and good.&amp;nbsp; Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=OND;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Mouse Treatment Day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Running= Treatment | Day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repeated Day / subject =Mouse;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmeans Treatment | Day / diff;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general I'm getting good results with this (feel free to critique though).&amp;nbsp; The problem is that while most of my groups have data for all 14 days, one of my groups only has data for 8 days (mortality issues), so when I look at the output from the lsmeans, this group is non-estimate-able, and the difference estimates relevant to this group fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought proc mixed was able to handle missing data, so I'm confused about why it can't deal with this.&amp;nbsp; Does anyone have any thoughts about how I can get the estimates for this group?&amp;nbsp; Am I using the wrong model for this type of data?&amp;nbsp; Please help!&amp;nbsp; Thanks ahead of time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 22:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107354#M5663</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-08T22:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107355#M5664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can fit models with missing data, but you cannot obtain least squares means for main effects when interaction cells are completely empty (when you have interactions in the model). There are different approaches to handle this. One common way is to fit the 'means model'. Just use the interaction term:&lt;/P&gt;&lt;P&gt;model&amp;nbsp; = Treatment*Day;&lt;/P&gt;&lt;P&gt;lsmeans Treatment*Day / diff;&lt;/P&gt;&lt;P&gt;You can write contrast or estimate statements for selected contrasts of interest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 15:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107355#M5664</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-09T15:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107356#M5665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm confused.&amp;nbsp; Perhaps I don't understand what you're suggesting.&amp;nbsp; I don't see how this is any different than what I've done.&amp;nbsp; Doesn't the vertical bar ( | ) imply the isolate terms as well as their interaction?&amp;nbsp; In other words, that writing "Treatment | Day" was identical to writing "Treatment Day Treatment*Day".&amp;nbsp; If my understanding is correct, could you clarify how your suggestion differs from my original coding?&amp;nbsp; I'm just trying to figure this out.&amp;nbsp; Thanks for your time and thoughts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 15:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107356#M5665</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-09T15:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107357#M5666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;model Treatment*Day;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;only&lt;/EM&gt; gives Treatment*Day, no main effect of Treatment and no main effect of Day. This is often called a means model in comparison to an effect model (what you coded). If you have combinations treatment and day with no observations, you cannot have the main effect lsmeans (they are not estimable, by definition, if you also have an interaction in the model). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 15:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107357#M5666</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-09T15:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107358#M5667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah!&amp;nbsp; I understand now.&amp;nbsp; Thanks for explaining it.&amp;nbsp; When I look at my results though, I see an effect of treatment but no effect of day or interaction of the two.&amp;nbsp; So, I'm need to estimate the effect of each of the five treatment groups.&amp;nbsp; If I just use the treatment*day term, can I still estimate the main effect of treatment using "estimate" statements?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 17:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107358#M5667</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-09T17:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107359#M5668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since I have one treatment group that ends the study early, it doesn't seem reasonable to assume my data points are missing at random.&amp;nbsp; The more I look into this, the more it seems like I need some sort of joint model to link the longitudinal quantitative measure with the survival data.&amp;nbsp; Does anyone have any experience with this in SAS?&amp;nbsp; I think I'm getting way out of my league here...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 21:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107359#M5668</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-09T21:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107360#M5669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With missing cells, there are different approaches one could take, and no simple guidance for you (even assuming that you have missing at random). There will be detractors and proponents for each possibility. If there is good evidence that you do not have an interaction, then you could just model the main effect(s). &lt;/P&gt;&lt;P&gt;model&amp;nbsp; = Treatment Day;&lt;/P&gt;&lt;P&gt;lsmeans Treatment Day / diff;&lt;/P&gt;&lt;P&gt;Results would be biased if you really have an interaction (but fail to detect it because of poor power). If you don't have many missing cells at the end, you could just end the data set at the last time where you have at least one observation in each treatment-time cell. But if this means giving up too many times for some treatments, then this would not be a great approach. One could use multiple imputation to fill in the cells m times, and use the methodology for imputations. Or you could use the full data set and the means model (just treatment*days, no main effect), as I described above. You could use some contrasts for treatment, but this will be tricky to code if you are not used to contrast syntax in mixed. I can't get into this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given that the missing data are not random, this raises all kinds of other issues. There is a big literature on this for mixed models, but you don't have any easy solutions. You probably will need to work with a statistician to work this out.&amp;nbsp; I am sure I forgot some other approaches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 21:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107360#M5669</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-09T21:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107361#M5670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to echo &lt;A __default_attr="178104" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;'s approach for using a means model.&amp;nbsp; We have used it quite successfully in modeling repeated measures data where treatments were applied for different lengths of time.&amp;nbsp; You will have to use ESTIMATE or LSMESTIMATE statements to get tests of main effects, but that is actually a good thing, and, in my opinion, much to be preferred to multiple imputation where the data are missing not at random.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 12:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107361#M5670</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-10-10T12:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107362#M5671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like the means model is the way to go.&amp;nbsp; I've never used the model in this manner before, so I have a couple of questions.&amp;nbsp; First off, I assume the F value from the fixed effects is no longer relevant.&amp;nbsp; It's giving me garbage anyways.&amp;nbsp; Next, Steve mentioned using LSESTIMATE, but unless I'm missing something, PROC MIXED can't do this.&amp;nbsp; So, it seems like I'll need to use ESTIMATE.&amp;nbsp; Given the fixed effects are garbage, do I need to specify the degrees of freedom for the ESTIMATE statement?&amp;nbsp; Since I'm only using the interaction factor, I'll need to include all 70 terms in my ESTIMATE statement, correct?&amp;nbsp; What would that make my DF?&amp;nbsp; &lt;/P&gt;&lt;P&gt;Here's what I was considering for my ESTIMATE statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ESTIMATE 'Group 1 vs Group 2' intercept 1 Treatment*Day&lt;/P&gt;&lt;P&gt;.07 .07 .07 .07 .07 .07 .07 .07 .07 .07 .07 .07 .07 .07&lt;/P&gt;&lt;P&gt;-.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07 -.07&lt;/P&gt;&lt;P&gt;0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;0 0 0 0 0 0 0 0 0 0 0 0 0 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this seem reasonable?&amp;nbsp; I have 5 treatment groups (so five lines) and I got the .07 from the number of days I have data for (14).&amp;nbsp; The 0's may not be necessary in this case, but they help me keep things straight as I create more ESTIMATE statements.&amp;nbsp; I ran this, and it's still giving me "Non-est' for result.&amp;nbsp; Thoughts?&amp;nbsp; Thanks again for all the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 15:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107362#M5671</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-10T15:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107363#M5672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am bothered whey you say the F test for fixed effects are giving you garbage. What do you mean? If you are using the means model as we described, then the F test is for the effect of 'group', where group is the combination of treatment and time. That is, are there differences among the groups? You should be getting realistic numbers for F and the df. If not, you are doing something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contrasts can get very tricky with interaction means. You have to be careful about how the levels are sorted, based on the order in the class statement and the values of the codes. You can go very wrong, and I can't tell. But if there are not 14 days for each treatment, there would be less than the 5*14 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of this assumes that the data you have are unbiased measures of the actual random variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 19:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107363#M5672</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-10T19:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107364#M5673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the code I'm using:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc mixed data=OND;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Mouse Treatment Day;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model Running= Treatment*Day;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repeated Day / subject =Mouse;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;The Fixed effects results are:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Effect&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumDF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DenDF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pr &amp;gt; F&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Treatment*Day&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 199&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0002&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I only say they're garbage because they disagreed so intensely with my prior results, which showed p=0.9827 for the interaction.&amp;nbsp; Is this an incorrect statement?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Regarding the ESTIMATES, how do I know if days are being excluded from my model?&amp;nbsp; I assumed that SAS left those cells empty, but that they still existed for the group missing days.&amp;nbsp; Is this not the case?&amp;nbsp; Does it have fewer cells?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 19:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107364#M5673</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-10T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107365#M5674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are totally different hypotheses being tested. With &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Treat Day Treat*Day, &lt;/P&gt;&lt;P&gt;test of the last term is strictly for the interaction (not for main effects). But if you don't have main effects, the test of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Treat*Day&lt;/P&gt;&lt;P&gt;is for everything (i.e., a test of 'group' where group corresponds to a combination of treat, day, and the interaction). The significant result you now get makes perfect sense. It does not necessarily mean you have an interaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should get the book "SAS for Mixed Models, 2nd edition" by Littell et al. (2006). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 20:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107365#M5674</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-10T20:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107366#M5675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah! That makes sense!&amp;nbsp; Thanks.&amp;nbsp; I'm heading to the library right now.&amp;nbsp; It definitely seems like I need a better background in this, as I have no idea what I'm doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the mean time, I still can't make comparisons between the bad group and the other groups, even using the means model.&amp;nbsp; Using the "/solution" statement, I was able to see the order of the components of my ESTIMATE statement.&amp;nbsp; Using this order, I still get non-est for every comparison with this group.&amp;nbsp; I can accurately compare any other groups, but nothing works with this group.&amp;nbsp; Any idea why this may be the case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 20:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107366#M5675</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2013-10-10T20:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107367#M5676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use the solution option:&lt;/P&gt;&lt;P&gt;model Running= Treatment*Day / solution ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will show you the parameters being estimated, and the order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 20:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107367#M5676</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-10T20:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107368#M5677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are putting in the right coefficients in the estimate statement, you should not have any problem at all with getting estimable values (for the 'means' model). I can't tell from your posts where the problem lies, but the advantage of the 'means' model is that you can get results. I am guessing you are putting in nonzeros for the wrong terms. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 13:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107368#M5677</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2013-10-11T13:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107369#M5678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CONTRAST requires an exact sum to zero for all of the elements, so rounding in the coefficients can make things non-estimable. The ESTIMATE statement is better, and I see your example.&amp;nbsp; However, it appears that the example has elements for missing parts, and so may be the reason for returning 'non-est'. It is one of the reasons I prefer using PROC GLIMMIX to PROC MIXED, and using the LSMESTIMATE statement.&amp;nbsp; Divisors can be specified so that it all works out.&amp;nbsp; Yes, it can be done with the ESTIMATE statement, but the idea in a means model is that you are estimating the least squares mean for each of the cells in treatment*day.&amp;nbsp; From those, you estimate main effects (and differences in levels of the main effects) as linear combinations of those cell means.&amp;nbsp; Rather quickly you will see if you are correctly specifying coefficients to get the comparisons of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 14:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107369#M5678</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-10-11T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107370#M5679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've finally gotten around to finishing up this project and thanks to the earlier help everyone here provided, I feel like I'm good to go. I have a few follow-up questions. Remember, I'm fairly out of my league here both in terms of my understanding of mixed models as well as my comprehension of means models.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Since some of my treatment groups are missing days entirely, can I safely assume there will always be a "treatment x Day" interaction? I'm worried about the case in which there is a main effect of one or the other, but no interaction. I can't see obvious way to report a main effect using this method.&lt;/LI&gt;&lt;LI&gt;Do I need to correct for multiple comparisons of all my lsestimates statements? I'm used to an ANOVA setting, where the DFs used by my posthocs are encumbered in the model itself, so no correction of posthocs is necessary. It looks like proc glimmix is using t-tests, so that would suggest I need to correct for multiple comparisons. Thoughts?&lt;/LI&gt;&lt;LI&gt;How do I go about reporting these results in a manuscript? I'm used to reporting the fixed effects followed by the posthocs; in a means model should I be reporting the "Treatment*Day" F? What about in the case of #1 above, where there is no interaction, but there is a main effect? How do I report this?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks for the help! You guys are the best!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 19:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107370#M5679</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2014-01-22T19:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107371#M5680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&amp;nbsp; When fitting a means model, don't think of treatment * day as an interaction.&amp;nbsp; Think of it as a shortcut in notation for a one-way analysis.&amp;nbsp; If it is not "significant", then I would feel very uncomfortable constructing main effects.&amp;nbsp; A main effect is then "defined" as contrasts/estimates/lsmestimates between one set of LSmeans and a second set. For the LSMESTIMATE statement, this would mean invoking the JOINT option to get a joint F test that accommodates the multiple parts of the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I correct for multiple comparisons, as these are post-hoc comparisons.&amp;nbsp; So aside from the JOINT option, you should use ADJUST= &amp;lt;pick your method of choice, I happen to like SIMULATE&amp;gt; and ADJDFE=ROW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Report the overall F, and any of the F tests from the JOINT option that tests main effect and interaction LSMESTIMATES.&amp;nbsp; Specific comparisons (post-hocs, in your terminology) would then be reported with the adjusted P values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 19:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107371#M5680</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-01-24T19:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107372#M5681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;Thanks again for the help, but I'm still running into some issues. It looks like Proc glimmix doesn't include a joint option for lsmestimate statements. It does provide an FTEST option. Should I be using this? I've been scouring the web all morning for examples of how to use this with my code, and have totally drawn a blank. I've copied a bit of what have below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=in;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class mouse treatment day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model score = treatment*day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random day / subject=Mouse group=treatment;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmestimate treatment*day 'treatment1 vs treatment2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .125 .125 .125 .125 .125 .125 .125 .125&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmestimate treatment*day 'treatment1 vs treatment3'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .125 .125 .125 .125 .125 .125 .125 .125&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a few more lsmestimate statements included in the full code, but they pretty much follow the examples I provided. Note, Group 1 only has 8 'days', while the other groups have 14, hence the differential weighting. I'm also correcting for multiple comparisons as you suggested, but using proc multtest in a separate step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, given what I've provided, how would the FTEST option (if that's correct) fit into my LSMESTIMATE statements as written? Do I need a new LSMESTIMATE statement that will use the FTEST option? If so, how do I weight the individual cells to give me appropriate weights. I'm used to one cell being positive and the other negative, but that doesn't seem right in the case of the FTEST/JOINT option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to belabor the issues I'm having, but I simply can't find useful examples of this online, and thus have to resort back to the forum for help. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 17:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107372#M5681</guid>
      <dc:creator>FiveTenMatt</dc:creator>
      <dc:date>2014-02-25T17:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed lsmeans with zero cell</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107373#M5682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have several LSMESTIMATE statements, separated by commas, which is going to be troublesome.&amp;nbsp; I have copied the above code and changed it as needed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=in;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class mouse treatment day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model score = treatment*day;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random day / subject=Mouse group=treatment;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsmestimate treatment*day 'treatment1 vs treatment2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .125 .125 .125 .125 .125 .125 .125 .125&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0,&lt;/P&gt;&lt;P&gt; 'treatment1 vs treatment3'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .125 .125 .125 .125 .125 .125 .125 .125&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071 -.071&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;STRONG&gt;/FTEST&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note that "lsmestimate treatment*day" appears only once at the start of the block, the labels identify each section, and that finally the FTEST option is added after a forward slash at the end of the last of the comparisons in the block.&amp;nbsp; In this case, it will give a joint F-test for 1 v 2 and 2 v 3, which would look to me like a 2 nuerator degree of freedom F test equivalent to the null of t1=t2=t3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 19:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-lsmeans-with-zero-cell/m-p/107373#M5682</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-02-26T19:12:14Z</dc:date>
    </item>
  </channel>
</rss>

