<?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 variable X not found in the VAR statement in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620204#M29901</link>
    <description>&lt;P&gt;Please show the code submitted along with the error generated. Copy the proc and messages from the Log and paste into a code box opened on the forum using the {i} or "running man" icon.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 15:52:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-01-27T15:52:48Z</dc:date>
    <item>
      <title>proc MI variable X not found in the VAR statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620199#M29900</link>
      <description>&lt;P&gt;Dear all,&lt;BR /&gt;&lt;BR /&gt;I am doing PROC MI to impute data under MNAR.&lt;BR /&gt;My data is a continuous response with 7 repeated measurement,&amp;nbsp;a continuous covariate with 7 repeated measurement, and&amp;nbsp;a categorical covariate with 7 repeated measurement.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  proc mi data=monotonized seed=123 out=mnar_imputedXYZ simple nimpute=5 round=0.01 minimum=0;
  CLASS Z_1 Z_2 Z_3 Z_4 Z_5 Z_6 Z_7;
	  VAR  y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 Z_3 y4 X_4 Z_4 
	y5 X_5 Z_5 y6 X_6 Z_6 y7 X_7  Z_7           ;
  monotone reg;
  monotone discrim(Z_1= y1 X_1   y2 X_2   y3 X_3   y4 X_4   
	y5 X_5   y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_2=  y1 X_1  y2 X_2   y3 X_3   y4 X_4   
	y5 X_5   y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_3=  y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 y4 X_4  
	y5 X_5   y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_4=  y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 Z_3 y4
X_4  y5 X_5   y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_5=  y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 Z_3 
y4 X_4 Z_4 y5 X_5   y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_6= y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 Z_3 y4 X_4 Z_4 
	y5 X_5 Z_5 y6 X_6   y7 X_7  /classeffects=include);
  monotone discrim(Z_7= y1 X_1 Z_1 y2 X_2 Z_2 y3 X_3 Z_3 y4 X_4 Z_4 
	y5 X_5 Z_5 y6 X_6 Z_6 y7 X_7  /classeffects=include);
 mnar model( y1 y2 y3 y4 y5
  y6 y7 X_1 X_2 X_3 X_4 X_5 X_6 X_7
Z_1 Z_2 Z_3 Z_4 Z_5 Z_6 Z_7/modelobs=ncmv);
  run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;log messages:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The covariate Y2 is not in the VAR statement.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.MNAR_IMPUTEDXYZ may be incomplete. When this step was stopped there&lt;BR /&gt;were 0 observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.MNAR_IMPUTEDXYZ was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I put covariates under VAR statement in the order that I put the complete columns first to the columns with least observations.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="order 1" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35631i800891AF9C84ECEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="missingPattern2.JPG" alt="order 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;order 1&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also tried to write the VAR with order as follows, given that my data is repeated measurement with 7-time points and missingness occur in both predictor and response :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="order 2" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35632i8AE620252514C68A/image-size/large?v=v2&amp;amp;px=999" role="button" title="missingPattern.JPG" alt="order 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;order 2&lt;/span&gt;&lt;/span&gt;&lt;BR /&gt;Both order types giving me errors such as&amp;nbsp;" ERROR: The covariate "X" is not in the VAR statement" or&amp;nbsp;"ERROR: The monotone&amp;nbsp; statement cannot be applied to a nonmonotone data"&lt;BR /&gt;My questions are:&lt;BR /&gt;1) which correct order of variable I should put in VAR statement? order 1 or order 2?&lt;BR /&gt;2) how to solve the error of "covariate X not in the VAR statement" although it is already in the VAR statement?&lt;BR /&gt;&lt;BR /&gt;Thank you for any help&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 16:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620199#M29900</guid>
      <dc:creator>alfa95</dc:creator>
      <dc:date>2020-01-27T16:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc MI variable X not found in the VAR statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620204#M29901</link>
      <description>&lt;P&gt;Please show the code submitted along with the error generated. Copy the proc and messages from the Log and paste into a code box opened on the forum using the {i} or "running man" icon.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 15:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620204#M29901</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-01-27T15:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc MI variable X not found in the VAR statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620217#M29902</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;Hello, thank you for the suggestion, I edited by including the code already&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 16:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620217#M29902</guid>
      <dc:creator>alfa95</dc:creator>
      <dc:date>2020-01-27T16:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc MI variable X not found in the VAR statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620577#M29903</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The ordering of the variables on the VAR statement effects the way in which the imputation models are configured because of the montonicity.&amp;nbsp;&amp;nbsp;It assumes that the variables are listed such that they exhibit a monotone missing pattern from left to right.&amp;nbsp;&amp;nbsp;In other words, the left-most variable has no missing values, the second has fewer then the third and so on.&amp;nbsp;&amp;nbsp;This means that the imputation models are built such that only a variable that is to the left of a given variable may be used in its imputation model&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically there is a problem with this MONOTONE statement:&lt;/P&gt;
&lt;P&gt;monotone discrim(Z_1= y1 X_1&amp;nbsp;&amp;nbsp; y2 X_2&amp;nbsp;&amp;nbsp; y3 X_3&amp;nbsp;&amp;nbsp; y4 X_4&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y5 X_5&amp;nbsp;&amp;nbsp; y6 X_6&amp;nbsp;&amp;nbsp; y7 X_7&amp;nbsp; /classeffects=include);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since y2 (and several others) comes in the VAR list after Z_1 then it cannot be used as a covariate.&amp;nbsp; Only those variables listed to the left of Z_1 on the VAR statement could be used.&amp;nbsp; If you want to use models that include other variables then you will need to relax the monotone assumption and use the FCS approach instead.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 17:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-MI-variable-X-not-found-in-the-VAR-statement/m-p/620577#M29903</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2020-01-28T17:39:33Z</dc:date>
    </item>
  </channel>
</rss>

