<?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: Multiple Imputation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793999#M38935</link>
    <description>&lt;P&gt;You will need to sort the LsMeans data set and then run MIANALYZE BY VFAT_Q.&amp;nbsp; See this example as a template.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/30/698.html" target="_blank"&gt;30698 - How do I combine the LSMEANS and differences in LSMEANS from Proc GLM using Proc MIANALYZE? (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are also looking to combine the differences then you can follow this example as well by looking at the second example on the page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 12:22:36 GMT</pubDate>
    <dc:creator>SAS_Rob</dc:creator>
    <dc:date>2022-02-02T12:22:36Z</dc:date>
    <item>
      <title>Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793684#M38901</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am trying to do a multiple imputation. In my proc mi step, I am including all variables in my dataset that I would like to analyze. The only variable with missing data is "hei2015_total_score", which is continuous. Next, I used a general linear model to investigate one of my outcomes of interest. However, the "Parameter estimate" is not created. I get the following error message " &lt;FONT color="#0000FF"&gt;NOTE: Interactivity disabled with BY processing.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;label, or path is spelled correctly. Also, verify that the appropriate procedure options&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;are used to produce the requested output object. For example, verify that the NOPRINT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;option is not used.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I have attached my code below. Thank you in advance for your help!&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mi data=mri2 out= impute_mri;
class new_educ vfat_q  sat_q pfat_q plean_q race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
var log_wm log_temporal_wm log_parietal_Wm log_occipital_WM  log_frontal_WM
log_enor_cortex hippocampal_volume total_brain_volume grey_matter precuneus amygdala 
cingulate_region vfat_q sat_q pfat_q plean_q new_educ race new_smoke hrtassign exercise diabetes 
cvdisease htn hrt_hx ICV_cc  age  mri_dy alcswk hei2015_total_score;
fcs reg(hei2015_total_score);
run;

proc glm data=impute_mri;
class new_educ vfat_q  race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
model cingulate_region= vfat_q  new_educ race new_smoke hrtassign exercise
diabetes cvdisease htn hrt_hx  ICV_cc hei2015_total_score age  mri_dy alcswk;
lsmeans vfat_q /pdiff stderr om cl cov;
by _imputation_;
ods output ParameterEstimates= imputemri2;
run;


proc mianalyze parms=imputemri2 ;
class new_educ vfat_q  race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
modeleffects  intercept ICV_cc hei2015_total_score age  mri_dy alcswk new_educ vfat_q  race new_smoke hrtassign exercise  diabetes 
cvdisease htn hrt_hx;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Feb 2022 08:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793684#M38901</guid>
      <dc:creator>zaldarsa</dc:creator>
      <dc:date>2022-02-01T08:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793699#M38902</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/257233"&gt;@zaldarsa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The note about interactivity just informs you that you can't use PROC GLM interactively in this situation (see &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_glm_details05.htm" target="_blank" rel="noopener"&gt;Using PROC GLM Interactively&lt;/A&gt;), which you didn't intend anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you see that warning about ODS output datasets not created without an obvious reason (like a misspelled object name or the NOPRINT option) you should refer to the section &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_glm_details70.htm" target="_blank" rel="noopener"&gt;ODS Table Names&lt;/A&gt; under "Details" in the procedure documentation (same place for virtually all statistical procedures). In your particular case you'll find out that the ParameterEstimates object requires the &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_glm_syntax16.htm#statug.glm.modl_opt_solution" target="_blank" rel="noopener"&gt;SOLUTION option&lt;/A&gt; of the MODEL statement if classification effects are involved (which is the case as you have a CLASS statement). I hope that adding this option will resolve the issue because I can't say much about the PROC MI and PROC MIANALYZE steps.&lt;/P&gt;
&lt;PRE&gt;model cingulate_region= vfat_q  new_educ race new_smoke hrtassign exercise
diabetes cvdisease htn hrt_hx  ICV_cc hei2015_total_score age  mri_dy alcswk&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt; / solution&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Feb 2022 09:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793699#M38902</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-02-01T09:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793732#M38903</link>
      <description>&lt;P&gt;By default, PROC GLM does not create a ParameterEstimates table. You need to add the SOLUTION option at the end of the MODEL statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=impute_mri;
class new_educ ...;
model cingulate_region= vfat_q  ... alcswk / SOLUTION;
...
ods output ParameterEstimates= imputemri2;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Because PROC GLM is an interactive procedure, you should get in the habit of using the QUIT statement with PROC GLM. The ODS tables are not output until the procedure exits.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 11:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793732#M38903</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-02-01T11:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793754#M38906</link>
      <description>&lt;P&gt;Even after correcting the omission of the SOLUTION option, you will still need to make a modification of the ParameterEstimates data set in order to have MIANALYZE read it in correctly.&amp;nbsp; You should follow the example in the usage note linked below.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/48/700.html" target="_blank"&gt;48700 - Additional examples of combining PROC GLM results in PROC MIANALYZE (sas.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 13:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793754#M38906</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-02-01T13:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793947#M38933</link>
      <description>&lt;P&gt;Hi!&amp;nbsp; So I did look into that example, and several others but I am still a bit confused. Since I am interested in the least square means for the variable vfat_Q, should my code look something like this? I'm not too sure if I'm on the right track and what my next steps should be to fill in the missing values for non imputed cells.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc glm data=impute_mri;
class new_educ vfat_q  race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
model cingulate_region= vfat_q  new_educ race new_smoke hrtassign exercise
diabetes cvdisease htn hrt_hx  ICV_cc hei2015_total_score age  mri_dy alcswk/solution;
lsmeans vfat_q /pdiff stderr om cl cov;
by _imputation_;
ods output lsmeans= lsm;
run; quit;

proc mianalyze data=lsm;
ods output parameterestimates=ls_means;
modeleffects lsmean;
stderr stderr;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Feb 2022 02:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793947#M38933</guid>
      <dc:creator>zaldarsa</dc:creator>
      <dc:date>2022-02-02T02:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793999#M38935</link>
      <description>&lt;P&gt;You will need to sort the LsMeans data set and then run MIANALYZE BY VFAT_Q.&amp;nbsp; See this example as a template.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/30/698.html" target="_blank"&gt;30698 - How do I combine the LSMEANS and differences in LSMEANS from Proc GLM using Proc MIANALYZE? (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are also looking to combine the differences then you can follow this example as well by looking at the second example on the page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 12:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/793999#M38935</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-02-02T12:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794147#M38942</link>
      <description>&lt;P&gt;Thank you for sharing this template, it has been quite helpful. However, when i try to run the proc mianalyze now the following error message occurs:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;At least two imputations are required for PROC MIANALYZE.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Data set WORK.LSM is not sorted in ascending sequence. The current BY group has vfat_q = Q4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;and the next BY group has vfat_q = Q1.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I don't understand why its giving this message if there are 25 imputations.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mi data=mri2 out= impute_mri;
class new_educ vfat_q  sat_q pfat_q plean_q race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
var log_wm log_temporal_wm log_parietal_Wm log_occipital_WM  log_frontal_WM
log_enor_cortex hippocampal_volume total_brain_volume grey_matter precuneus amygdala 
cingulate_region vfat_q sat_q pfat_q plean_q new_educ race new_smoke hrtassign exercise diabetes 
cvdisease htn hrt_hx ICV_cc  age  mri_dy alcswk hei2015_total_score;
fcs reg(hei2015_total_score);
run;

proc mixed data=impute_mri;
class new_educ vfat_q  race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
model cingulate_region= vfat_q  new_educ race new_smoke hrtassign exercise
diabetes cvdisease htn hrt_hx  ICV_cc hei2015_total_score age  mri_dy alcswk/solution;
lsmeans vfat_q /diff;
by _imputation_;
ods select lsmeans ;
ods output lsmeans= lsm ;
run; quit;


proc sort data=lsm; by _imputation_ vfat_q ; run;


proc mianalyze data=lsm;
by vfat_q;
modeleffects estimate;
stderr stderr;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 00:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794147#M38942</guid>
      <dc:creator>zaldarsa</dc:creator>
      <dc:date>2022-02-03T00:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794211#M38947</link>
      <description>&lt;P&gt;Check the ordering on the BY statement in Proc SORT.&amp;nbsp; You should first sort by the analysis variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data=lsm; by vfat_q _imputation_; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 12:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794211#M38947</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-02-03T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794383#M38958</link>
      <description>&lt;P&gt;Thank you so much , it worked! I do have one last question. I would like to use the proc mianalyze procedure to a Pr&amp;gt;F value associated with vfat_q from the Type 3 test of fixed effects. My proc minalyze code isn't working.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mixed data=impute_mri;
class new_educ vfat_q  race new_smoke hrtassign exercise  diabetes cvdisease htn hrt_hx;
model cingulate_region= vfat_q  new_educ race new_smoke hrtassign exercise
diabetes cvdisease htn hrt_hx  ICV_cc hei2015_total_score age  mri_dy alcswk;
lsmeans vfat_q /diff;
by _imputation_;
ods output lsmeans= lsm tests3=type3test;
run; quit;

proc sort data=type3test;  by effect  _imputation_ ; run;

proc mianalyze data=type3test; 
class effect;
modeleffects effect;
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Feb 2022 02:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794383#M38958</guid>
      <dc:creator>zaldarsa</dc:creator>
      <dc:date>2022-02-04T02:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794465#M38959</link>
      <description>&lt;P&gt;You need to add a TEST statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mianalyze data=type3test; 
class effect;
modeleffects effect;
test effect;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the examples in the documentation for the TEST statement look like they are for a regression on continuous variables though, so I am not sure this is the correct syntax for a categorical variable. If the code doesn't work (and I am guessing it may not which is why I am editing my response), then you will probably need to use an ODS output statement to get the parameter estimates and the covariance matrix, and then hand calculate (DATA step or PROC IML) the F test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using my friend Mr. Google, I found this link on Paul Allison's site:&amp;nbsp;&lt;A href="https://www.sas.upenn.edu/~allison/combchi.sas" target="_self"&gt;https://www.sas.upenn.edu/~allison/combchi.sas&lt;/A&gt;&amp;nbsp;The COMBCHI macro requires PROC IML, so if that is not available to you, then this method wouldn't be an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BarbClothier presents a dummy variable approach in this thread:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Proc-Mianalyze-obtaining-combined-results-for-categorical/td-p/118162" target="_blank"&gt;Proc Mianalyze: obtaining combined results for cat... - SAS Support Communities&lt;/A&gt;.&amp;nbsp; This approach will allow for the use of the TEST statement, but be prepared to edit the COVB dataset.&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;</description>
      <pubDate>Fri, 04 Feb 2022 14:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794465#M38959</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-02-04T14:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Imputation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794533#M38960</link>
      <description>&lt;P&gt;Unfortunately there is not a good way currently to combine Type3 tests, especially when they follow an F-distribution.&amp;nbsp; MIANALYZE will not allow you to use a TEST statement with a CLASS variable so that approach won't work directly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One option would be to dummy code the CLASS variable prior to running MIXED and then use a TEST statement in MIANALYZE on the dummy variables.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 15:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-Imputation/m-p/794533#M38960</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-02-04T15:09:07Z</dc:date>
    </item>
  </channel>
</rss>

