<?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: Binary variable in class statement? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121778#M33532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lily,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's interesting.&amp;nbsp; The first thing I notice is that the standard errors for the time estimates are much smaller in the first picture.&amp;nbsp; This makes me think there are some interesting things going on elsewhere in the model.&amp;nbsp; Would it be possible to show all of your MIXED code?&amp;nbsp; In particular, I wonder about things like RANDOM and REPEATED elements. Something has to be absorbing the variability.&amp;nbsp; Correlations may also be involved.&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, 26 Apr 2013 16:20:53 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2013-04-26T16:20:53Z</dc:date>
    <item>
      <title>Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121773#M33527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have to put binary variable into class statement in modeling procedures like proc mixed? I somehow remembered saw somewhere if a variable is a binary variable, it doesn't matter whether put it to class statement or not. But why I got very different results when the binary variable was in the class statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should we always put all binary variables into class statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 12:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121773#M33527</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-26T12:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121774#M33528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would (almost) always include them in the CLASS statement.&amp;nbsp; To consider them as continuous variables (i.e., exclude from the CLASS statement) could lead to unusual interpretations, especially if you start to create ESTIMATE statements.&amp;nbsp; Also, it will enable you to get LSMEANS for each level of the variable.&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, 26 Apr 2013 12:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121774#M33528</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-26T12:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121775#M33529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Steve! I thought this won't change the results, but surprisely found the results changes significantly, not the binary variable itself, but the other variable has interaction term with it. why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have time, role, time*role.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Role not in CLASS statement, I had those p_values from Type 3 tests: Time: p=.68, role: p=.25, time*role: p=.79&lt;/P&gt;&lt;P&gt;If Role in CLASS statement, Time: p=.04, role: p=.25, time*role:p=.79&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Role and time*role didn't change, but time changed alot. why?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 14:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121775#M33529</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-26T14:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121776#M33530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lily,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will become apparent what is happening if you add the solution option to the model statement, but I could be wrong.&amp;nbsp; First, is time a categorical or a continuous covariate?&amp;nbsp; If continuous, then the latter values test the following: time - does the overall slope differ from zero, averaged over roles, role - do intercepts differ, time*role - do slopes differ for the two roles.&amp;nbsp; The former values all are tests of whether slopes differ from zero, and of deviations from a homogeneous slope (interaction), so you are really testing different hypotheses, resulting in different p values for the tests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If time is a categorical variable, then I'm very surprised by the results.&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, 26 Apr 2013 15:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121776#M33530</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-26T15:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121777#M33531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Time was continous in above example. Your explaination makes sense. But the attached output were from time as a categorical variables with/without put Role in CLASS statement. Any clue? Still only coefficient for Time changed. Role and Time*Role remained the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Role In CLASS Statement:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="CLASS.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3480_CLASS.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Role Not in CLASS Statement:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="NoCLASS.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3481_NoCLASS.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 16:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121777#M33531</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-26T16:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121778#M33532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lily,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's interesting.&amp;nbsp; The first thing I notice is that the standard errors for the time estimates are much smaller in the first picture.&amp;nbsp; This makes me think there are some interesting things going on elsewhere in the model.&amp;nbsp; Would it be possible to show all of your MIXED code?&amp;nbsp; In particular, I wonder about things like RANDOM and REPEATED elements. Something has to be absorbing the variability.&amp;nbsp; Correlations may also be involved.&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, 26 Apr 2013 16:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121778#M33532</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-26T16:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121779#M33533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have&lt;/P&gt;&lt;P&gt;proc mixed data=xxx ;&lt;/P&gt;&lt;P&gt;class ID Time; *or Class ID Time Role;&lt;/P&gt;&lt;P&gt;Model yy=time role time*role/s;&lt;/P&gt;&lt;P&gt;repeated time/type=cs sub=id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 16:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121779#M33533</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-26T16:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121780#M33534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding rcorr to the repeated statement, and then let's look at the correlation matrix under the two class systems.&amp;nbsp; I think things get "tighter" resulting in smaller standard errors.&amp;nbsp; The other part of the output to look at will be the covariance parameter estimates.&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, 26 Apr 2013 17:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121780#M33534</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-26T17:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121781#M33535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lily,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contrary to what Steve said, I often include binary variables as continuous in analyses.&amp;nbsp; It can create some very nice shortcuts for summarizing a lot of data.&amp;nbsp; In previous versions of SAS, we had to do that in order to include the categorical predictor when there was no CLASS statement available (e.g. PROC LOGISTIC in version 6).&amp;nbsp; The binary variables had to be coded 0-1 for this to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the reason you are getting the different estimates when you treat Role as continuous is that it is coded 1 and 2.&amp;nbsp; If you recode it as a 0-1 variable, you should get the same result for the model estimation with it as a class or continuous variable.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like Steve said, you will not be able to use some of the optional tools if it is treated continuous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 18:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121781#M33535</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-04-26T18:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121782#M33536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dr. Muhlbaier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried recode Role as 0,1. It didn't come with the same output as put it into CLASS statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_values are: Time: 0.0024, Role1:0.0183, time*role: 0.6874&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still, p values for role and time*role remained the same, but Time is different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correlation matrix and covariance parameter estimates for Role recoded as 0, 1 AND NOT in CLASS:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cov and Rcorr No Class.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3484_Cov and Rcorr No Class.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Correlation Matrix and Covariance parameter estimates as Role in CLASS:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cov and Rcorr CLASS.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3483_Cov and Rcorr CLASS.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Role as 1,2 AND NOT in CLASS;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cov and Rcorr No Class as 12.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3485_Cov and Rcorr No Class as 12.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 20:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121782#M33536</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-26T20:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121783#M33537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it seems pretty obvious that the correlation matrix is identical under all of the parameterizations.&amp;nbsp; Time to look at the likelihood function.&amp;nbsp; How much does it change when you change ROLE between continuous and categorical?&amp;nbsp; If there is a big difference, then I get nervous that there is missing data or something that is causing cases to be excluded under one or the other situation.&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>Mon, 29 Apr 2013 13:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121783#M33537</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-29T13:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121784#M33538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are no differences. Role as continuous or categorical got all the same fit stats( -2 LL, AIC, AICC, BIC)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 14:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121784#M33538</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-29T14:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121785#M33539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something is causing the standard errors of the estimates to change radically, and if it is not the residual error (likelihood) or the correlations (RCORR) then I am out of the things that I know.&amp;nbsp; At this point, I think opening a track with SAS Technical Support is well worth your time.&amp;nbsp; When you get something from them, could you please post it here?&amp;nbsp; I am really curious, and I don't have a clue at this point as to what is causing this behavior.&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>Mon, 29 Apr 2013 15:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121785#M33539</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-04-29T15:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121786#M33540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also consider posting your code, you've only posted results so far.&lt;/P&gt;&lt;P&gt;But I would also contact Tech Support as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 16:14:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121786#M33540</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-29T16:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Binary variable in class statement?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121787#M33541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have posted the code earlier (on#6). Here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc mixed data=xxx covtest ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;class ID Time; *or Class ID Time Role;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Model yy=time role time*role/s;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;repeated time/type=cs sub=id rcorr;&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;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 16:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Binary-variable-in-class-statement/m-p/121787#M33541</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2013-04-29T16:35:04Z</dc:date>
    </item>
  </channel>
</rss>

