<?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: mixed modelling, help with correct model writing in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/286202#M15139</link>
    <description>&lt;P&gt;I agree--the first model is more easily interpreted (and since it was my first thought, that says something as well). &amp;nbsp;Sometimes, overthinking a model will lead to trouble. &amp;nbsp;I did see a zero estimate, so you probably saw something about the G matrix not being positive definite. &amp;nbsp;In this case, that is not a problem--the REML estimates of variance components are better estimators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 18:05:05 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2016-07-21T18:05:05Z</dc:date>
    <item>
      <title>mixed modelling, help with correct model writing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/285871#M15101</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am writting a&amp;nbsp; model to estimate the varaince components, and I am not sure of the correct model to estimate the components I need. Please help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I have 60 patients, who each got&amp;nbsp; scanned on 6 days, and 6 times everyday. Each scan contains 20 images. I want to estimate intraday, interday and intrascan variance. With my model my residual variance is higher than the intraday varaince, which is causing doubts. 20 images within a scan should be very close and should have least variability. scans within a day should than have less varaibility than variability between days. Please help me with correct model writing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=p2.req;
class pt_nbr day_nbr scan_nbr image_nbr ;
model Y= ;
random day_nbr pt_nbr day_nbr*pt_nbr scan_nbr(day_nbr) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Mixed: Covariance Parameter Estimates" frame="box" rules="all" cellpadding="5" cellspacing="0"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Covariance Parameter Estimates&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Cov Parm&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Estimate&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;day_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;1078.39&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*day_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;12.7373&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;scan_nbr(day_nbr)&lt;/TH&gt;
&lt;TD class="r data"&gt;2.1783&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Residual&lt;/TH&gt;
&lt;TD class="r data"&gt;13.0825&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Jul 2016 16:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/285871#M15101</guid>
      <dc:creator>Ruhi</dc:creator>
      <dc:date>2016-07-20T16:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: mixed modelling, help with correct model writing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/285917#M15111</link>
      <description>&lt;P&gt;You may wish to fit a fully factorial random model. &amp;nbsp;I have a hunch that the missing terms are falling to the residual error, and consequently inflating it. &amp;nbsp;What happens if you try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=p2.req;
class pt_nbr day_nbr scan_nbr image_nbr ;
model Y= ;
random pt_nbr|day_nbr|scan_nbr ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used the pipe notation to get all main effects, the three first order interactions and the second order interaction. &amp;nbsp;You could also delete image_nbr from the class statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem I see here is that these repeated measurements mean that the actual experimental unit is the scan_nbr, and the residual error is pseudo-replication. &amp;nbsp;With that in mind, what happens with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=p2.req;
class pt_nbr day_nbr scan_nbr image_nbr ;
model Y= ;
random pt_nbr|day_nbr|scan_nbr@2 ;
repeated image_nbr/subject=pt_nbr*day_nbr*scan_nbr;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Have to admit I am spitballing at this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 17:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/285917#M15111</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-07-20T17:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: mixed modelling, help with correct model writing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/286158#M15133</link>
      <description>&lt;P&gt;Hello Steve&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your quick reply. I tried your both models. I personally think first one is better, I think because I understand it better :).FYI, I don't have missing data.&lt;/P&gt;
&lt;P&gt;Fit statistics are also better with the first model. From the sas output that follows , I think the highlighted portions of the data will give me the required estimates I need. Please let me know if you think I am thinking correct?&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Mixed: Covariance Parameter Estimates" frame="box" rules="all" cellpadding="5" cellspacing="0"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Covariance Parameter Estimates&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Cov Parm&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Estimate&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;1042.21&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;day_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;0.1685&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*day_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;13.0275 (interday)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;scan_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;0.2490&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*scan_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;0.3753&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;day_nbr*scan_nbr&lt;/TH&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*day_nb*scan_n&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;9.9088(Intraday)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Residual&lt;/TH&gt;
&lt;TD class="r data"&gt;&lt;STRONG&gt;4.3063(intrascan)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="branch"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="branch"&gt;SAS output form the second model you suggested.&lt;/DIV&gt;
&lt;DIV class="branch"&gt;SAS Output
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Mixed: Covariance Parameter Estimates" frame="box" rules="all" cellpadding="5" cellspacing="0"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="3" scope="colgroup"&gt;Covariance Parameter Estimates&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Cov Parm&lt;/TH&gt;
&lt;TH class="l b header" scope="col"&gt;Subject&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Estimate&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;1041.89&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;day_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;0.1569&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*day_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;14.5853&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;scan_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;0.2367&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;pt_nbr*scan_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;2.2446&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;day_nbr*scan_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="r data"&gt;0.07033&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;image_nbr&lt;/TH&gt;
&lt;TH class="l data"&gt;pt_nbr*day_nb*scan_n&lt;/TH&gt;
&lt;TD class="r data"&gt;11.0527&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jul 2016 15:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/286158#M15133</guid>
      <dc:creator>Ruhi</dc:creator>
      <dc:date>2016-07-21T15:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: mixed modelling, help with correct model writing</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/286202#M15139</link>
      <description>&lt;P&gt;I agree--the first model is more easily interpreted (and since it was my first thought, that says something as well). &amp;nbsp;Sometimes, overthinking a model will lead to trouble. &amp;nbsp;I did see a zero estimate, so you probably saw something about the G matrix not being positive definite. &amp;nbsp;In this case, that is not a problem--the REML estimates of variance components are better estimators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 18:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-modelling-help-with-correct-model-writing/m-p/286202#M15139</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-07-21T18:05:05Z</dc:date>
    </item>
  </channel>
</rss>

