<?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 Multiple imputation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/316822#M16679</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question regarding mcmc imputation. From what I understand, the 1st step should be the imputation phase with&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;proc mi data=&lt;/SPAN&gt;&amp;nbsp;........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then the 2nd should be the analysis phase: e.g proc glm.......&lt;/P&gt;&lt;P&gt;and the 3rd is the pooling phase with proc mianalyze ......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Question: I used mcmc in the 1st step and would like to include more than one variable in the 2nd step since I have more than one variable to impute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that &amp;nbsp;only the last model statement is used: (&amp;nbsp;WARNING: Only the last MODEL statement is used.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I can only model one variable at a time, how can I combine those together in the end.??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data=cohort1 nimpute=20 out=cohort_MCMC_1&lt;BR /&gt;seed=2017&lt;BR /&gt;round= 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2&lt;BR /&gt;min= 14 1 0 0 0 0 0 0 0 0 0 0 30 1 0 0 0 0 0 0 0 0 0 0 0 1200 1200 1200 1200&lt;BR /&gt;max= 45 20 10 20 1 1 1 1 1 1 1 1 42 9 1 1 1 1 1 10 10 10 10 10 10 5500 5000 5000 5000 &amp;nbsp;;&lt;BR /&gt;mcmc impute=monotone ;&lt;BR /&gt;var x1 x2&amp;nbsp;x3&amp;nbsp;&amp;nbsp;x4 -------- x20&amp;nbsp;;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**************************************************************************************/&lt;BR /&gt;proc glm /* or mixed &amp;nbsp;*/ data=&lt;SPAN&gt;cohort&lt;/SPAN&gt;&lt;SPAN&gt;_MCMC_1 &lt;/SPAN&gt;;&lt;BR /&gt;class x1 x2 x3 ------x10;&lt;BR /&gt;model x1=&amp;nbsp;x1------x5;&lt;BR /&gt;model x2= x2-----x7;&lt;BR /&gt;model x3= x6-------x15&amp;nbsp;;&lt;BR /&gt;model x4= x4------x20;&lt;BR /&gt;by _imputation_;&lt;BR /&gt;ods output ParameterEstimates=gm_mcmc;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2016 19:46:47 GMT</pubDate>
    <dc:creator>seltonsy</dc:creator>
    <dc:date>2016-12-05T19:46:47Z</dc:date>
    <item>
      <title>Multiple imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/316822#M16679</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question regarding mcmc imputation. From what I understand, the 1st step should be the imputation phase with&amp;nbsp; &lt;SPAN class="fontstyle0"&gt;proc mi data=&lt;/SPAN&gt;&amp;nbsp;........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then the 2nd should be the analysis phase: e.g proc glm.......&lt;/P&gt;&lt;P&gt;and the 3rd is the pooling phase with proc mianalyze ......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Question: I used mcmc in the 1st step and would like to include more than one variable in the 2nd step since I have more than one variable to impute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that &amp;nbsp;only the last model statement is used: (&amp;nbsp;WARNING: Only the last MODEL statement is used.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I can only model one variable at a time, how can I combine those together in the end.??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data=cohort1 nimpute=20 out=cohort_MCMC_1&lt;BR /&gt;seed=2017&lt;BR /&gt;round= 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2&lt;BR /&gt;min= 14 1 0 0 0 0 0 0 0 0 0 0 30 1 0 0 0 0 0 0 0 0 0 0 0 1200 1200 1200 1200&lt;BR /&gt;max= 45 20 10 20 1 1 1 1 1 1 1 1 42 9 1 1 1 1 1 10 10 10 10 10 10 5500 5000 5000 5000 &amp;nbsp;;&lt;BR /&gt;mcmc impute=monotone ;&lt;BR /&gt;var x1 x2&amp;nbsp;x3&amp;nbsp;&amp;nbsp;x4 -------- x20&amp;nbsp;;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**************************************************************************************/&lt;BR /&gt;proc glm /* or mixed &amp;nbsp;*/ data=&lt;SPAN&gt;cohort&lt;/SPAN&gt;&lt;SPAN&gt;_MCMC_1 &lt;/SPAN&gt;;&lt;BR /&gt;class x1 x2 x3 ------x10;&lt;BR /&gt;model x1=&amp;nbsp;x1------x5;&lt;BR /&gt;model x2= x2-----x7;&lt;BR /&gt;model x3= x6-------x15&amp;nbsp;;&lt;BR /&gt;model x4= x4------x20;&lt;BR /&gt;by _imputation_;&lt;BR /&gt;ods output ParameterEstimates=gm_mcmc;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 19:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/316822#M16679</guid>
      <dc:creator>seltonsy</dc:creator>
      <dc:date>2016-12-05T19:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/317913#M16747</link>
      <description>&lt;P&gt;GLM can handle multiple dependent variables, but it really doesn't like having a variable on both sides of the equals sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, it appears that your dependent variables are to be modeled with different independent variables. &amp;nbsp;To me, that means setting up separate streams for each dependent variable, up to k dependent variables. &amp;nbsp;The process would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC MI (across all data)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLM-dependent variable 1&lt;/P&gt;
&lt;P&gt;PROC GLM-dependent variable 2&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;PROC GLM-dependent variable k&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC MIANALYZE-dependent variable 1&lt;/P&gt;
&lt;P&gt;PROC MIANALYZE-dependent variable 2&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;PROC MIANALYZE-dependent variable k&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now if the indpendent variables are identical across all k dependent variables, I think this could be collapsed using multiple dependent variable syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I am missing something on this, then let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/317913#M16747</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-12-09T15:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/318681#M16840</link>
      <description>&lt;P&gt;Thanks Steve,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main concern (and apologies if I don't understand the missing data handling very well in SAS) is that I have 5 different variables with different levels of missingness that I want to impute together. I guess you want me to proceed with several GLM models which will yield different sets. I'm worried that I won't be able to combine those at the end with proc mianalyze.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please correct me if I'm wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 19:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/318681#M16840</guid>
      <dc:creator>seltonsy</dc:creator>
      <dc:date>2016-12-13T19:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/320781#M16941</link>
      <description>&lt;P&gt;Not quite. &amp;nbsp;I visualize three or four&amp;nbsp;rounds of imputation for all missing independent variables, simultaneously. &amp;nbsp;Then, for each dependent variable/independent variable combination, you run PROC GLM with a by imputation statement. &amp;nbsp;You can then combine these analyses using MIANALYZE, one for each dependent/independent variable combination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, if (and only if) you have the same independent variables for ALL of the dependent variables, you would run one GLM in multivariate mode, with a by imputation statement, followed by one MIANALYZE to combine these analyses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, suppose you had y1, y2 and y3 as dependent variables, and x1, x2, x3, and x4 as independent variables. &amp;nbsp;You would need to run PROC MI to impute any missing values in x1, x2, x3 and x4--say three to five imputations. &amp;nbsp;Then suppose you wanted to fit&amp;nbsp;y1 from x1 and x2, y2 from x3 and x4, and y3 from x1, x3 and x4. &amp;nbsp;Your GLM statements would look something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glm data=imputeddata;&lt;/P&gt;
&lt;P&gt;by _imputation_:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;class x1 x2;&lt;/P&gt;
&lt;P&gt;model y1=x1 x2/inverse;&lt;/P&gt;
&lt;P&gt;ods output ParameterEstimates=glmparms_y1 InvXPX=glmxpxi_y1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;proc mianalyze parms=glmparms_y1 xpxi=glmxpxi_y1 edf=(you insert the correct degrees of freedom based on number of imputed values in x1 and x2);&lt;/P&gt;
&lt;P&gt;modeleffects intercept x1 x2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would then repeat this for y2, using x3 and x4, and for y3 using x1, x3, and x4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now suppose you use x1, x2, x3, and x4 for y1, y2, and y3. You might try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glm data=imputeddata;&lt;/P&gt;
&lt;P&gt;by _imputation_:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;class x1 x2 x3 x4;&lt;/P&gt;
&lt;P&gt;model y1 y2 y3=x1 x2 x3 x4/inverse;&lt;/P&gt;
&lt;P&gt;ods output ParameterEstimates=glmparms_y1 InvXPX=glmxpxi_y1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;proc mianalyze parms=glmparms_y1 xpxi=glmxpxi_y1 edf=(you insert the correct degrees of freedom based on number of imputed values in all of the xi's);&lt;/P&gt;
&lt;P&gt;modeleffects intercept x1 x2 x3 x4;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This, I assume would give univariate analyses for y1, y2 and y3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Accommodating any multivariate relationship among y1, y2 and y3, using the&amp;nbsp;MANOVA statement in GLM may be possible, but I would say "Get in touch with Tech Support" for something like that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 17:47:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation/m-p/320781#M16941</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-12-22T17:47:32Z</dc:date>
    </item>
  </channel>
</rss>

