<?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 estimate statement in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/659006#M31548</link>
    <description>&lt;P&gt;I am curious how&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/57910"&gt;@kc&lt;/a&gt;&amp;nbsp; got different values by treatment for baseline_scale, miss and dth without including an interaction terms in the model. I have to assume that the univariate calculations do not represent the marginal population estimates that the model fit would come up with if the interactions were included.&amp;nbsp; Further, it appears to me that the current ESTIMATE statements are attempts to reproduce the raw means, which sort of nullifies the point of modeling treatment differences, accounting for continuous variables by setting them equal in the two groups .&lt;SPAN style="font-family: inherit;"&gt;However, there are a lot of continuous and continuous by continuous terms in this model, and adding in categorical by continuous terms (separate slopes) seems like it might result in an overfit or a dimensionality problem, depending on the number of observations.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also consider using an EFFECT statement to get the polynomial terms in month, and use the STANDARDIZE method=moments to center and scale the variable month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jun 2020 14:16:27 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-06-15T14:16:27Z</dc:date>
    <item>
      <title>proc mixed estimate statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658177#M31530</link>
      <description>&lt;P&gt;I am running a growth curve model for longitudinal data analysis using proc mixed on a dataset with 2 treatment groups. I have estimate statements to calculate individual means and the difference between means of the 2 treatment groups at 6 month follow-up. I am running in to an issue where the difference calculated by the estimate statement is not the same as the actual difference between the individual means. The sample code is below -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;trt&lt;/STRONG&gt; has values A and B, &lt;STRONG&gt;fup_scale&lt;/STRONG&gt; and &lt;STRONG&gt;baseline_scale&lt;/STRONG&gt; are continuous variables, &lt;STRONG&gt;miss&lt;/STRONG&gt; and &lt;STRONG&gt;dth&lt;/STRONG&gt; are binary variables with values 1 and 0, &lt;STRONG&gt;month&lt;/STRONG&gt; specifies follow-up month,&amp;nbsp;&lt;STRONG&gt;sq_month&lt;/STRONG&gt; is just a quadratic term for month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have assigned treatment specific weights to baseline scale, miss and dth variables in the estimate statements when calculating individual means and overall weights for miss and dth in the estimate statement for difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not able to figure out whats missing or incorrect in these statements - any help is appreciated!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;proc mixed&lt;/STRONG&gt; data=gcm method=ml covtest noitprint noclprint;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;class&lt;/STRONG&gt; trt pt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;model&amp;nbsp;&lt;/STRONG&gt;fup_scale = baseline_scale trt month sq_month miss dth&lt;BR /&gt;trt*month trt*sq_month trt*miss trt*dth &lt;BR /&gt;trt*miss*month trt*dth*month &lt;BR /&gt;miss*month miss*sq_month &lt;BR /&gt;dth*month dth*sq_month / solution;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;random&lt;/STRONG&gt; intercept month / sub=pt type=un G Gcorr;&lt;/P&gt;
&lt;P&gt;*averaged estimates*;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;estimate 'avg mean at 6m - trt A'&lt;/STRONG&gt;&lt;BR /&gt;intercept 1 baseline_scale 57.66 trt 1 0 month 6 sq_month 36 miss 0.20 dth 0.30&lt;BR /&gt;trt*month 6 0 trt*sq_month 36 0 trt*miss 0.20 0 trt*dth 0.30 0&lt;BR /&gt;trt*miss*month 1.2 0 trt*dth*month 1.8 0 &lt;BR /&gt;miss*month 1.2 miss*sq_month 7.2 &lt;BR /&gt;dth*month 1.8 dth*sq_month 10.8 /cl;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;estimate 'avg mean at 6m - trt B'&lt;/STRONG&gt;&lt;BR /&gt;intercept 1 baseline_scale 57.19 trt 0 1 month 6 sq_month 36 miss 0.25 dth 0.35 &lt;BR /&gt;trt*month 0 6 trt*sq_month 0 36 trt*miss 0 0.25 trt*dth 0 0.35 &lt;BR /&gt;trt*miss*month 0 1.5 trt*dth*month 0 2.1 &lt;BR /&gt;miss*month 1.5 miss*sq_month 9 &lt;BR /&gt;dth*month 2.1 dth*sq_month 12.6 /cl;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;estimate 'avg Difference at 6m: A - B'&lt;/STRONG&gt;&lt;BR /&gt;trt 1 -1 &lt;BR /&gt;trt*month 6 -6 trt*sq_month 36 -36 &lt;BR /&gt;trt*miss 0.225 -0.225 trt*dth 0.325 -0.325 &lt;BR /&gt;trt*miss*month 1.35 -1.35 trt*dth*month 1.95 -1.95/cl;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 18:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658177#M31530</guid>
      <dc:creator>kc</dc:creator>
      <dc:date>2020-06-12T18:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimate statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658472#M31543</link>
      <description>&lt;P&gt;Just a quick look here...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not clear on what you mean by "the actual difference between the individual means". By "individual means" do you mean "avg mean at 6m - trt A" and "avg mean at 6m - trt B"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then "avg Difference at 6m: A - B" will not reproduce the difference between the A estimate and the B estimate because the coefficients are different for most of the terms. For example, the coefficient for baseline_scale for A is 57.66; for B, 57.19. For the estimates to match, you would need to add&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;baseline_scale 0.47&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where 0.47 = 57.66 - 57.19 to the avg Diff estimate statement. And so on for all the other terms that don't cancel out (i.e., that have a difference that is nonzero).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally speaking, the estimate for a difference is the difference between the estimates, term by term.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an unsolicited aside: this is a really busy multiple regression with lots of interactions. I'd consider centering (perhaps even standardizing) the continuous covariates. It's also multilevel, so you perhaps could be thinking about random coefficients models and other details about regressions in mixed models, assuming you have a sufficiently large sample to support more estimation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 03:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658472#M31543</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2020-06-15T03:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimate statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658994#M31547</link>
      <description>&lt;P&gt;These estimate statements could be replaced by LSMESTIMATE statements with the AT option.&amp;nbsp; For instance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmestimate trt 'avg lsmean at 6m - trt A' 1 0/ cl AT
( baseline_scale month sq_month miss dth) = ( 57.66   6  36  0.20 0.30)
;
lsmestimate trt 'avg lsmean at 6m - trt B' 0 1/ cl AT
( baseline_scale month sq_month miss dth) = ( 57.66   6  36  0.20 0.30)
;
lsmestimate trt 'difference between lsmeans at 6m - trt A' 1 -1/ cl AT
( baseline_scale month sq_month miss dth) = ( 57.66   6  36  0.20 0.30)
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the covariate values are accommodated in the LSMEANs, such that the LSMESTIMATE statement applies them across the estimable function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 13:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/658994#M31547</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-15T13:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimate statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/659006#M31548</link>
      <description>&lt;P&gt;I am curious how&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/57910"&gt;@kc&lt;/a&gt;&amp;nbsp; got different values by treatment for baseline_scale, miss and dth without including an interaction terms in the model. I have to assume that the univariate calculations do not represent the marginal population estimates that the model fit would come up with if the interactions were included.&amp;nbsp; Further, it appears to me that the current ESTIMATE statements are attempts to reproduce the raw means, which sort of nullifies the point of modeling treatment differences, accounting for continuous variables by setting them equal in the two groups .&lt;SPAN style="font-family: inherit;"&gt;However, there are a lot of continuous and continuous by continuous terms in this model, and adding in categorical by continuous terms (separate slopes) seems like it might result in an overfit or a dimensionality problem, depending on the number of observations.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also consider using an EFFECT statement to get the polynomial terms in month, and use the STANDARDIZE method=moments to center and scale the variable month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 14:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimate-statement/m-p/659006#M31548</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-15T14:16:27Z</dc:date>
    </item>
  </channel>
</rss>

