<?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 of post-stratification variables (proc mi) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation-of-post-stratification-variables-proc-mi/m-p/926646#M46085</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset of individuals with a specific disease. The dataset comprises the variable "immigrant" which indicates the immigration status of the individual (immigrant = 0 and 1 for non-immigrant and immigrant status, respectively).&lt;/P&gt;&lt;P&gt;The dataset also includes immigrant-specific variables, that are the one with values only for the immigrants. For example, "immigration category" (imm_cat) is a variable indicating the immigration class of the individual. Obviously, the non-immigrants will not have any value for immigrant-specific variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset has missing data in all of the variables, including the "immigrant" variable, which I will then use as an stratification for reporting the annual rates. The immigrant-specific variables also have missing data.&lt;/P&gt;&lt;P&gt;The missing data patterns is as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Missing Data Patterns&lt;/DIV&gt;&lt;DIV align="center"&gt;rss_new&amp;nbsp; sex&amp;nbsp; &amp;nbsp;age&amp;nbsp; &amp;nbsp; &amp;nbsp; immigrant&amp;nbsp; &amp;nbsp; &amp;nbsp;imm_cat&amp;nbsp; &amp;nbsp; &amp;nbsp;hiv_baseline&amp;nbsp; &amp;nbsp; &amp;nbsp; hiv&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Freq&amp;nbsp; &amp;nbsp; Percent&amp;nbsp; &amp;nbsp; age mean&lt;/DIV&gt;&lt;DIV align="center"&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;3550&lt;/TD&gt;&lt;TD&gt;85.87&lt;/TD&gt;&lt;TD&gt;37.783380&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&g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c mi and do MICE for imputing the above variables in the dataset. I will indeed need to put a condition for the multiple imputation so that SAS will not impute the immigrant-specific variables for non-immigrants. The issue is that the "immigrant" variable itself has missing data. So, SAS should impute the immigrant-specific variables for observed immigrants as well as the imputed immigrants. I could not find any function in the proc mi allowing me to put condition on the imputated cells.&amp;nbsp; My question is that "what is the best approach to address this?"&lt;/P&gt;&lt;P&gt;I am copying below the basic proc mi I aimed initially to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data = dt&amp;nbsp; nimpute 25 out=test25&amp;nbsp; seed =54321&amp;nbsp; &amp;nbsp;minimum = . . 0 . . . . .&amp;nbsp; maximum = . . 93 . . . . . ;&lt;/P&gt;&lt;P&gt;class rss_new sex immigrant imm_cat hiv_baseline hiv;&lt;/P&gt;&lt;P&gt;var&amp;nbsp;rss_new sex age immigrant imm_cat hiv_baseline hiv&lt;/P&gt;&lt;P&gt;&amp;nbsp;fcs discrim (immigrant&amp;nbsp; imm_cat&amp;nbsp; hiv_baseline&amp;nbsp; hiv / classeffects=include details) regpmm( age / details) nbiter = 1000;&lt;/P&gt;&lt;P&gt;fcs plots = trace(mean std);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with the above lines of codes is that they impute all the variables in the fcs statement without putting any condition (e.g., impute the immigrant-specific variables for only immigrant individuals). So, at the end of the imputation, for example, I am having some imputed values of imm_cat for some non-immigrant individuals.&lt;/P&gt;&lt;P&gt;Can anyone help me address this need, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 17:05:37 GMT</pubDate>
    <dc:creator>homipilot</dc:creator>
    <dc:date>2024-05-01T17:05:37Z</dc:date>
    <item>
      <title>Multiple imputation of post-stratification variables (proc mi)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation-of-post-stratification-variables-proc-mi/m-p/926646#M46085</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset of individuals with a specific disease. The dataset comprises the variable "immigrant" which indicates the immigration status of the individual (immigrant = 0 and 1 for non-immigrant and immigrant status, respectively).&lt;/P&gt;&lt;P&gt;The dataset also includes immigrant-specific variables, that are the one with values only for the immigrants. For example, "immigration category" (imm_cat) is a variable indicating the immigration class of the individual. Obviously, the non-immigrants will not have any value for immigrant-specific variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset has missing data in all of the variables, including the "immigrant" variable, which I will then use as an stratification for reporting the annual rates. The immigrant-specific variables also have missing data.&lt;/P&gt;&lt;P&gt;The missing data patterns is as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Missing Data Patterns&lt;/DIV&gt;&lt;DIV align="center"&gt;rss_new&amp;nbsp; sex&amp;nbsp; &amp;nbsp;age&amp;nbsp; &amp;nbsp; &amp;nbsp; immigrant&amp;nbsp; &amp;nbsp; &amp;nbsp;imm_cat&amp;nbsp; &amp;nbsp; &amp;nbsp;hiv_baseline&amp;nbsp; &amp;nbsp; &amp;nbsp; hiv&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Freq&amp;nbsp; &amp;nbsp; Percent&amp;nbsp; &amp;nbsp; age mean&lt;/DIV&gt;&lt;DIV align="center"&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;3550&lt;/TD&gt;&lt;TD&gt;85.87&lt;/TD&gt;&lt;TD&gt;37.783380&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;61&lt;/TD&gt;&lt;TD&gt;1.48&lt;/TD&gt;&lt;TD&gt;34.393443&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;0.19&lt;/TD&gt;&lt;TD&gt;30.000000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;503&lt;/TD&gt;&lt;TD&gt;12.17&lt;/TD&gt;&lt;TD&gt;34.242823&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;0.29&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I am aiming to run the proc mi and do MICE for imputing the above variables in the dataset. I will indeed need to put a condition for the multiple imputation so that SAS will not impute the immigrant-specific variables for non-immigrants. The issue is that the "immigrant" variable itself has missing data. So, SAS should impute the immigrant-specific variables for observed immigrants as well as the imputed immigrants. I could not find any function in the proc mi allowing me to put condition on the imputated cells.&amp;nbsp; My question is that "what is the best approach to address this?"&lt;/P&gt;&lt;P&gt;I am copying below the basic proc mi I aimed initially to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mi data = dt&amp;nbsp; nimpute 25 out=test25&amp;nbsp; seed =54321&amp;nbsp; &amp;nbsp;minimum = . . 0 . . . . .&amp;nbsp; maximum = . . 93 . . . . . ;&lt;/P&gt;&lt;P&gt;class rss_new sex immigrant imm_cat hiv_baseline hiv;&lt;/P&gt;&lt;P&gt;var&amp;nbsp;rss_new sex age immigrant imm_cat hiv_baseline hiv&lt;/P&gt;&lt;P&gt;&amp;nbsp;fcs discrim (immigrant&amp;nbsp; imm_cat&amp;nbsp; hiv_baseline&amp;nbsp; hiv / classeffects=include details) regpmm( age / details) nbiter = 1000;&lt;/P&gt;&lt;P&gt;fcs plots = trace(mean std);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with the above lines of codes is that they impute all the variables in the fcs statement without putting any condition (e.g., impute the immigrant-specific variables for only immigrant individuals). So, at the end of the imputation, for example, I am having some imputed values of imm_cat for some non-immigrant individuals.&lt;/P&gt;&lt;P&gt;Can anyone help me address this need, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 17:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation-of-post-stratification-variables-proc-mi/m-p/926646#M46085</guid>
      <dc:creator>homipilot</dc:creator>
      <dc:date>2024-05-01T17:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple imputation of post-stratification variables (proc mi)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation-of-post-stratification-variables-proc-mi/m-p/926831#M46089</link>
      <description>&lt;P&gt;Unfortunately there is not an option within Proc MI to subset the imputation models based on a group variable that also has missing values.&amp;nbsp; There isn't necessarily a good way to handle your situation based on this and I do not know of any references that discuss how it should be approached.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 18:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multiple-imputation-of-post-stratification-variables-proc-mi/m-p/926831#M46089</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2024-05-02T18:18:53Z</dc:date>
    </item>
  </channel>
</rss>

