<?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 Constrain a fix effect in porc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124592#M6524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;I'm trying to figure out how to constrain one/few fix effect in proc mixed?&lt;/P&gt;&lt;P&gt;Do anybody know how/if I can do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Eran &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 17:05:10 GMT</pubDate>
    <dc:creator>Eran</dc:creator>
    <dc:date>2012-09-18T17:05:10Z</dc:date>
    <item>
      <title>Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124592#M6524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;I'm trying to figure out how to constrain one/few fix effect in proc mixed?&lt;/P&gt;&lt;P&gt;Do anybody know how/if I can do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Eran &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124592#M6524</guid>
      <dc:creator>Eran</dc:creator>
      <dc:date>2012-09-18T17:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124593#M6525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You question is vague, but I assume you want to restrict a parameter to be positive (or negative), or you want more complex restrictions involving multiple parameters. Unfortunately, there is no &lt;STRONG&gt;explicit&lt;/STRONG&gt; way of restricting the parameters (nothing like the RESTRICT statement in REG). There are some advanced techniques where one can obtain restrictions by reformulating the model in terms of other created variables. But I don't know of any easy-to-use code for this. If you were more specific in your question, with an example, I could tell you more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 16:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124593#M6525</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2012-09-19T16:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124594#M6526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try to be more specific &lt;/P&gt;&lt;P&gt;Let's say that I have a diary data from several subjects. That is my data has a structure of&amp;nbsp; days nested within persons. &lt;/P&gt;&lt;P&gt;Let's say that my hypothesis is that daily mood will be predicted by daily positive and negative events. &lt;/P&gt;&lt;P&gt;So I want to use multi-level models analyses (MLM/HLM) with proc mixed to test my hypotheses.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;My model would be something like this &lt;/P&gt;&lt;P&gt;level 1: MOODjt&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;= b&lt;SUB&gt;0j &lt;/SUB&gt;+ b&lt;SUB&gt;1j&lt;/SUB&gt;*positive event &lt;SUB&gt; &lt;/SUB&gt;+ b&lt;SUB&gt;2j*&lt;/SUB&gt;negative event + e&lt;SUB&gt;ij&lt;/SUB&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;(j=person j, t=day t) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And the level 2 (random) of the model would be- &lt;/P&gt;&lt;P&gt;Level 2:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;b&lt;SUB&gt;0j&lt;/SUB&gt;&lt;/SPAN&gt;=&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt; γ&lt;/SPAN&gt;&lt;SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;00&lt;/SPAN&gt;&lt;/SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;+ u&lt;SUB&gt;oj&lt;/SUB&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="NL" style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;b&lt;SUB&gt;1j&lt;/SUB&gt;&lt;/SPAN&gt;= &lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;γ&lt;/SPAN&gt;&lt;SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;10&lt;/SPAN&gt;&lt;/SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;+ u&lt;SUB&gt;1j&lt;/SUB&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="NL" style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;b&lt;SUB&gt;2j&lt;/SUB&gt;&lt;/SPAN&gt;= &lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;γ&lt;/SPAN&gt;&lt;SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;20&lt;/SPAN&gt;&lt;/SUB&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;+ u&lt;SUB&gt;2j&lt;/SUB&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="NL" style="font-family: 'Times New Roman','serif';"&gt;To test this model I would use the&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;following proc mixed syntax&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;mixed&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;covtest&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; id day;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; mood= positive_event negative_event/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;s&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; intercept positive_event negative_event/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; = id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;repeated&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; day/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; = id &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;type&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; = ar(&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;my question is if I want to constrain the positive_event and Negative_event to have the same weights (let's say of 1) in order to test if they are different from each other (that is, if the constrained model has less fit than the unconstrained model), how can I do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;Put it more simply, if I want that a certain fix effect will have specific value in order to test how it influences the fit of the model, how can I do it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman','serif';"&gt;Eran &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 17:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124594#M6526</guid>
      <dc:creator>Eran</dc:creator>
      <dc:date>2012-09-19T17:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124595#M6527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an outline of one possible approach. I am assuming by 'weight', you mean parameter, and you want to have a model where the two parameters are equal. If the number of positive and negative events are roughly the same overall, you could just create total = positive_event+negative_event; in a data step, and then fit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model = total / s;&lt;/P&gt;&lt;P&gt;Note that Y = a + b*total = a + b*(positive_event+negative_event) = a + b*positive_event + b*negative_event,&lt;/P&gt;&lt;P&gt;so now you have a model with equal parameter values. (I am ignoring the random effects for now). The model in your message would be&lt;/P&gt;&lt;P&gt;Y = a + b*positive_event + c*negative_event. If you fit the model with REML (the default), you cannot compare the log-likelihoods of your model and this simpler (reduced) one, because the fixed effects are eliminated from the likelihood. But if you fit both models with ML (method=ML on the procedure statement), you could compare the log-likelihoods with a chi-square test. &lt;/P&gt;&lt;P&gt;Dealing with the random effect makes all of this a bit trickier. For the reduced model, you probably could use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; random intercept total / subject=id;&lt;/P&gt;&lt;P&gt;If you took this approach, and used ML, the difference in the log-likelihoods (really difference in -2LL) would be based on the difference based on the fixed and random effects. There would be a total of 2 df in the difference of the log-likelihoods, one for the fixed effect and one for the random effect. You would not know automatically which of these two terms dominated the result. There may be another approach where you could focus just on the fixed effects. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be aware that ML can give somewhat biased parameter estimates, but if you have a large data set, the bias probably will be small.Also note that the use of random coefficient model &lt;EM&gt;could&lt;/EM&gt; take care of the temporal autocorrelations. That is, you might not need the repeated statement in addition to the random statement. You should explore the differences in fit with and without the repeated statement. Or look carefully at the AR parameter value to see if it is close to 0; or compare AIC values with and without the repeated statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 15:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124595#M6527</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2012-09-21T15:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124596#M6528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to follow up on my own message... My suggested approach will work best if the two predictors are about the same magnitude. If x1, for instance, consists of large numbers, and x2 consists of numbers near 0, then total (=x1+x2) will be dominated by x1 in the model fitting.&amp;nbsp; Also, interpretation of the results will be clearest if x1 and x2 are uncorrelated (which is not likely to be true). I am guessing that low correlation would not be too detrimental. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 18:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124596#M6528</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2012-09-21T18:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124597#M6529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivm &lt;/P&gt;&lt;P&gt;thank you very much for the detailed answer..... it helps me a lot. &lt;/P&gt;&lt;P&gt;Another thing, with the ML approach can I compare a model with only positive event as predictor to a model with positive event and negative event as predictors (with the X square distribution with 1 [in case of only added fix effect] or 2 [in case of random and fix effect] degree of freedom ?&lt;/P&gt;&lt;P&gt;and lastly, is the difference between the random and the repeated statement that the random statement models the &lt;STRONG&gt;between subject&lt;/STRONG&gt; random effect (e.g,. how positive event is associated differently with mood for each subject) and the repeated statement models the&lt;STRONG&gt; within person &lt;/STRONG&gt;variation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks a lot &lt;/P&gt;&lt;P&gt;Eran&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Sep 2012 17:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124597#M6529</guid>
      <dc:creator>Eran</dc:creator>
      <dc:date>2012-09-22T17:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Constrain a fix effect in porc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124598#M6530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are on the right track with your approach. And in your context, the repeated statement is specifying within-subject variation. But even if you don't use a repeated statement, there is still within-subject variation (a residual variance component). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 15:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Constrain-a-fix-effect-in-porc-mixed/m-p/124598#M6530</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2012-09-25T15:21:27Z</dc:date>
    </item>
  </channel>
</rss>

