<?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 MI adjustobs variable WARNING question in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/790222#M38744</link>
    <description>Hi balladw,&lt;BR /&gt;I know that AVAL is always missing when IMPLEVEL2=IMP1a. I deliberately&lt;BR /&gt;constructed the data in that way. However I am fitting (or trying to fit) a&lt;BR /&gt;single imputation model, estimated from the entire dataset and to adjust&lt;BR /&gt;subsets of those imputations. I am not trying to fit separate imputation&lt;BR /&gt;models as I think you're implying?&lt;BR /&gt;Also note that the imputation+shift adjustment is performed for this IMP1a&lt;BR /&gt;level, (and I think correctly performed). I'm trying to understand the&lt;BR /&gt;reason for the WARNING.&lt;BR /&gt;Thanks,&lt;BR /&gt;Ben&lt;BR /&gt;</description>
    <pubDate>Fri, 14 Jan 2022 19:20:59 GMT</pubDate>
    <dc:creator>benji3</dc:creator>
    <dc:date>2022-01-14T19:20:59Z</dc:date>
    <item>
      <title>PROC MI adjustobs variable WARNING question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789753#M38717</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like some help understanding a WARNING I'm receiving from proc MI when shifting imputations according to some classification variable (i.e. different shifts by different levels of the class variable).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My understanding of the code below is that I have called proc MI twice and using the same imputation model (one fit using all the data which depends only on the TRT variable) I have adjusted the MAR imputations by some shift (on the log-odds scale in this case because the model is an ordered logistic model).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand why a WARNING would be given, apparently because the observations selected for adjustment all have a missing outcome value. I think there is a single imputation model.&amp;nbsp;Why does it matter if the adjustments to a selection of observations happen to be unique to variables with a missing outcome? And the imputation appears to still be correctly performed despite the WARNING?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone shed light on this?&amp;nbsp;&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;PRE&gt;&lt;BR /&gt;&lt;CODE class=""&gt;/*create some data to illustrate the WARNING*/
data dsin;
call streaminit(1);
do USUBJID=1 to 200;
  if rand("UNIFORM") gt 0.2 then AVAL = rand("BINOMIAL", 0.5, 2);
  else AVAL=.;
  TRT = mod(USUBJID, 2);
  select;
    when (TRT=0)               do; IMPLEVEL1="IMP0";   IMPLEVEL2="IMP0 "; end;
    when (AVAL=. and TRT=1)    do; IMPLEVEL1="IMP1";   IMPLEVEL2="IMP1a"; end;
    when (AVAL ne . and TRT=1) do; IMPLEVEL1="IMP1";   IMPLEVEL2="IMP1b"; end;
  end;
  output;
end;
run;

/*This imputation shifts log odds of event=2 by 1 in TRT=0 and by 2 in TRT=1 arm compared to an MAR imputation?*/
proc mi data=dsin out=filled1 nimpute=10000;
class AVAL TRT IMPLEVEL1;
var TRT AVAL;
monotone logistic(AVAL = TRT);
mnar 
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL1="IMP0") shift=1)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL1="IMP1") shift=2)
;
run;

/*This imputation does the same thing, I think? but produces a WARNING: 

WARNING: IMPLEVEL2=IMP1a is not a valid classification level in the ADJUSTOBS= option in
         the MNAR statement.
*/
proc mi data=dsin out=filled2 nimpute=10000;
class AVAL TRT IMPLEVEL2;
var TRT AVAL;
monotone logistic(AVAL = TRT);
mnar 
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP0")  shift=1)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP1a") shift=2)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP1b") shift=2) /*This is a pointless because there is no missing data with IMPLEVEL2="IMP1b", but leave it here anyway for completeness*/
;
run;

proc sort data=filled1;
by TRT;
run;

proc means data=filled1;
by TRT;
var AVAL;
run;

proc sort data=filled2;
by TRT;
run;

proc means data=filled2;
by TRT;
var AVAL;
run;

/*the imputed data appears identical (on average) so why the WARNING?*/&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 09:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789753#M38717</guid>
      <dc:creator>benji3</dc:creator>
      <dc:date>2022-01-13T09:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MI adjustobs variable WARNING question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789881#M38723</link>
      <description>&lt;P&gt;Suggest running:&lt;/P&gt;
&lt;PRE&gt;proc freq data=dsin;
   tables aval*implevel2;
run;&lt;/PRE&gt;
&lt;P&gt;and examine how many combinations of aval=2 and implevel2='Imp1a'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hard to impute the result when that combination never occurs in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/206337"&gt;@benji3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like some help understanding a WARNING I'm receiving from proc MI when shifting imputations according to some classification variable (i.e. different shifts by different levels of the class variable).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My understanding of the code below is that I have called proc MI twice and using the same imputation model (one fit using all the data which depends only on the TRT variable) I have adjusted the MAR imputations by some shift (on the log-odds scale in this case because the model is and ordered logistic model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not understand why a WARNING would be given, apparently because the observations selected for adjustment all have a missing outcome value. I think there is a single imputation model.&amp;nbsp;Why does it matter if the adjustments to a selection of observations happen to be unique to variables with a missing outcome? And the imputation appears to still be correctly performed despite the WARNING?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone shed light on this?&amp;nbsp;&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;PRE&gt;&lt;BR /&gt;&lt;CODE class=""&gt;/*create some data to illustrate the WARNING*/
data dsin;
call streaminit(1);
do USUBJID=1 to 200;
  if rand("UNIFORM") gt 0.2 then AVAL = rand("BINOMIAL", 0.5, 2);
  else AVAL=.;
  TRT = mod(USUBJID, 2);
  select;
    when (TRT=0)               do; IMPLEVEL1="IMP0";   IMPLEVEL2="IMP0 "; end;
    when (AVAL=. and TRT=1)    do; IMPLEVEL1="IMP1";   IMPLEVEL2="IMP1a"; end;
    when (AVAL ne . and TRT=1) do; IMPLEVEL1="IMP1";   IMPLEVEL2="IMP1b"; end;
  end;
  output;
end;
run;

/*This imputation shifts log odds of event=2 by 1 in TRT=0 and by 2 in TRT=1 arm compared to an MAR imputation?*/
proc mi data=dsin out=filled1 nimpute=10000;
class AVAL TRT IMPLEVEL1;
var TRT AVAL;
monotone logistic(AVAL = TRT);
mnar 
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL1="IMP0") shift=1)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL1="IMP1") shift=2)
;
run;

/*This imputation does the same thing, I think? but produces a WARNING: 

WARNING: IMPLEVEL2=IMP1a is not a valid classification level in the ADJUSTOBS= option in
         the MNAR statement.
*/
proc mi data=dsin out=filled2 nimpute=10000;
class AVAL TRT IMPLEVEL2;
var TRT AVAL;
monotone logistic(AVAL = TRT);
mnar 
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP0")  shift=1)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP1a") shift=2)
  adjust(AVAL(event="2") / ADJUSTOBS= (IMPLEVEL2="IMP1b") shift=2) /*This is a pointless because there is no missing data with IMPLEVEL2="IMP1b", but leave it here anyway for completeness*/
;
run;

proc sort data=filled1;
by TRT;
run;

proc means data=filled1;
by TRT;
var AVAL;
run;

proc sort data=filled2;
by TRT;
run;

proc means data=filled2;
by TRT;
var AVAL;
run;

/*the imputed data appears identical (on average) so why the WARNING?*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 04:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789881#M38723</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-13T04:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MI adjustobs variable WARNING question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789929#M38725</link>
      <description>Hi balladw,&lt;BR /&gt;I know that AVAL is always missing when IMPLEVEL2=IMP1a. I deliberately constructed the data in that way. However I am fitting (or trying to fit) a single imputation model, estimated from the entire dataset and to adjust subsets of those imputations. I am not trying to fit separate imputation models as I think you're implying?&lt;BR /&gt;Also note that the imputation+shift adjustment is performed for this IMP1a level, (and I think correctly performed). I'm trying to understand the reason for the WARNING.&lt;BR /&gt;Thanks,&lt;BR /&gt;Ben</description>
      <pubDate>Thu, 13 Jan 2022 09:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/789929#M38725</guid>
      <dc:creator>benji3</dc:creator>
      <dc:date>2022-01-13T09:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MI adjustobs variable WARNING question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/790222#M38744</link>
      <description>Hi balladw,&lt;BR /&gt;I know that AVAL is always missing when IMPLEVEL2=IMP1a. I deliberately&lt;BR /&gt;constructed the data in that way. However I am fitting (or trying to fit) a&lt;BR /&gt;single imputation model, estimated from the entire dataset and to adjust&lt;BR /&gt;subsets of those imputations. I am not trying to fit separate imputation&lt;BR /&gt;models as I think you're implying?&lt;BR /&gt;Also note that the imputation+shift adjustment is performed for this IMP1a&lt;BR /&gt;level, (and I think correctly performed). I'm trying to understand the&lt;BR /&gt;reason for the WARNING.&lt;BR /&gt;Thanks,&lt;BR /&gt;Ben&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Jan 2022 19:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MI-adjustobs-variable-WARNING-question/m-p/790222#M38744</guid>
      <dc:creator>benji3</dc:creator>
      <dc:date>2022-01-14T19:20:59Z</dc:date>
    </item>
  </channel>
</rss>

