<?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: Warning about number of covariates for Difference in Difference Analysis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910319#M359007</link>
    <description>&lt;P&gt;Both studysite and prepost are coded as binary variables, so I am confused how there would be more than 4 levels. Despite not having issues with the results with other continuous variables, the survey variables are unable to generate the overall estimates for the DID analysis or results for the Differences of Least Squares Means.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 19:23:50 GMT</pubDate>
    <dc:creator>LL2023</dc:creator>
    <dc:date>2024-01-03T19:23:50Z</dc:date>
    <item>
      <title>Warning about number of covariates for Difference in Difference Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910312#M359004</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently working on some difference in difference analyses. I am comparing a number of outcomes between study sites to non study sites before the program started to after the program started (prepost). I was able to run these analyses without issues on most of my outcomes, but some of the outcomes gave the messages, "WARNING: More coefficients than levels specified for effect. Some coefficients will be ignored."&amp;nbsp; I used proc mixed with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;proc mixed data = data order = formatted;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;class studysite prepost steid;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;model outcome = prepost|studysite / solution;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;random int / subject = siteid type = un;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;Lsmeans prepost|studysite / diff;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;estimate "D-I-D" studysite*prepost 1 -1 -1 1;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;format futureintervention prepost;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not have any issues running this code with categorical outcomes or a few of my continuous outcomes. The outcomes that are giving me difficulties are based on survey data where participants could give a response between 0 and 10. The survey data does have a lot of missing values, but I got the same warning message whether or not I used a dataset only with complete observations or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be causing this error? Do I need to rewrite this code to better accommodate continuous outcomes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 18:46:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910312#M359004</guid>
      <dc:creator>LL2023</dc:creator>
      <dc:date>2024-01-03T18:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Warning about number of covariates for Difference in Difference Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910313#M359005</link>
      <description>&lt;P&gt;Your ESTIMATE statement uses 4 levels of the interaction&amp;nbsp;&lt;SPAN&gt;studysite*prepost, but SAS is saying that there are fewer than 4 levels of the interaction studysite*prepost in your data. Looking at the data to determine the number of levels in this interaction would be a good thing to do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;What could be causing this error? Do I need to rewrite this code to better accommodate continuous outcomes?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Also, this is not an ERROR, it is a WARNING indicating that perhaps you have something in the code that needs to be looked at more carefully. The WARNING has nothing to do with your continuous outcome. And despite the title of this post, it also has nothing to do with covariates.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 19:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910313#M359005</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-01-03T19:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Warning about number of covariates for Difference in Difference Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910319#M359007</link>
      <description>&lt;P&gt;Both studysite and prepost are coded as binary variables, so I am confused how there would be more than 4 levels. Despite not having issues with the results with other continuous variables, the survey variables are unable to generate the overall estimates for the DID analysis or results for the Differences of Least Squares Means.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 19:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910319#M359007</guid>
      <dc:creator>LL2023</dc:creator>
      <dc:date>2024-01-03T19:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Warning about number of covariates for Difference in Difference Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910320#M359008</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/453927"&gt;@LL2023&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Both studysite and prepost are coded as binary variables, so I am confused how there would be more than 4 levels. Despite not having issues with the results with other continuous variables, the survey variables are unable to generate the overall estimates for the DID analysis or results for the Differences of Least Squares Means.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The message indicates that there are fewer than four levels. You need to look at your data to see what levels of this interaction exist, and if there is actual response data at each of those levels.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 19:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910320#M359008</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-01-03T19:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Warning about number of covariates for Difference in Difference Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910325#M359009</link>
      <description>&lt;P&gt;Thank you so much! I hadn't seen this message before, so I thought it was indicating the opposite.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 20:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Warning-about-number-of-covariates-for-Difference-in-Difference/m-p/910325#M359009</guid>
      <dc:creator>LL2023</dc:creator>
      <dc:date>2024-01-03T20:03:36Z</dc:date>
    </item>
  </channel>
</rss>

