<?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: ERROR: Variable X is not in the PARMS= data set in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741951#M36085</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply! I have been following the textbook "Multiple Imputation of Missing Data Using SAS" by Berglund and Heeringa. They have written a full chapter on multiple imputation for the analysis of complex sample survey data and do not mention having to use "procsurvey impute." So, I guess I am just confused as to why I am having these errors if this code was indeed written for complex survey data. I was using the FCS method.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 18:22:26 GMT</pubDate>
    <dc:creator>stodo53</dc:creator>
    <dc:date>2021-05-17T18:22:26Z</dc:date>
    <item>
      <title>ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741563#M36036</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hi all,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I am having issues with imputing a few variables in my dataset. I am working with complex survey data with weights and I also am working with a subpopulation of my dataset. Specifically when I run the following code:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;*Proc MI imputation;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;proc mi data=combined seed=1180431796 nimpute=10 out=combined_imp_fcs;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;class t1_30grp t1_province t1_10_5cat t1_conchealth t1_poverty_2cat I2 t1_interruption;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;fcs nbiter=10 logistic(t1_conchealth/details) logistic(t1_30grp t1_poverty_2cat) regression(oasis) regression(cesd10_resc);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;var t1_province t1_10_5cat I2 t1_interruption mos_ss t1_cesd t1_oasis t1_conchealth t1_30grp oasis &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;cesd10_resc t1_poverty_2cat covid_weights;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;This is the warning message:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Warning msg.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59457iB55235644276A398/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Warning msg.png" alt="Warning msg.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I go to the next step and run my model with proc surveyreg, there are no issues. However, I encounter another problem when running proc mianalyze.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;proc mianalyze parms=combinedimp_regparms;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;by include;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;class t1_30grp t1_province t1_10_5cat t1_conchealth t1_poverty_2cat I2 t1_interruption; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;modeleffects intercept t1_30grp t1_province t1_10_5cat t1_conchealth t1_poverty_2cat I2 t1_interruption &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;mos_ss oasis cesd10_resc;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;run; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The following error message reads:  &lt;/P&gt;&lt;P&gt;ERROR: Variable t1_30grp is not in the PARMS= data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that this has been solved for other users by specifying the correct (classvar=) option, however I am unsure of what this is for the command "proc surveyreg"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 21:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741563#M36036</guid>
      <dc:creator>stodo53</dc:creator>
      <dc:date>2021-05-14T21:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741598#M36040</link>
      <description>Because you are using complex survey design, you need to consider Proc Surveyimpute for imputing missing values and then use survey procs to analyze the survey data.&lt;BR /&gt;Try SAS Surveyimpute method=FEFI (Efficient Fractional Imputation (FEFI). Please refer the paper: &lt;A href="https://support.sas.com/resources/papers/proceedings16/SAS3520-2016.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings16/SAS3520-2016.pdf&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 15 May 2021 05:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741598#M36040</guid>
      <dc:creator>gcjfernandez</dc:creator>
      <dc:date>2021-05-15T05:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741951#M36085</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply! I have been following the textbook "Multiple Imputation of Missing Data Using SAS" by Berglund and Heeringa. They have written a full chapter on multiple imputation for the analysis of complex sample survey data and do not mention having to use "procsurvey impute." So, I guess I am just confused as to why I am having these errors if this code was indeed written for complex survey data. I was using the FCS method.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 18:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741951#M36085</guid>
      <dc:creator>stodo53</dc:creator>
      <dc:date>2021-05-17T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741954#M36086</link>
      <description>&lt;P&gt;It would be helpful to see the steps in between the MI and MIANALYZE as well, but it might well be that the problem is because of the way that SURVEYREG codes CLASS variables, it is necessary to remove all blanks from the variable Parameter before using MIANALYZE.&amp;nbsp; Below is a simple example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*This assumes that the imputation has already been done*/&lt;BR /&gt;data farms;&lt;BR /&gt;do _imputation_=1 to 2;&lt;BR /&gt;do state=1 to 2;&lt;BR /&gt;do region=1 to 3;&lt;BR /&gt;do rep=1 to 5;&lt;BR /&gt;farmarea=ceil(ranuni(323)*100);&lt;BR /&gt;cornyield=.66+.95*state+.65*farmarea+rannor(3214);&lt;BR /&gt;weight=ceil(ranuni(0)*10);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc surveyreg data=Farms;&lt;BR /&gt;by _imputation_;&lt;BR /&gt;class region;&lt;BR /&gt;strata State ;&lt;BR /&gt;model CornYield = region FarmArea /solution;&lt;BR /&gt;weight Weight;&lt;BR /&gt;ods output parameterestimates=parms;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data parms;&lt;BR /&gt;set parms;&lt;BR /&gt;parameter=compress(parameter);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc mianalyze parms=parms;&lt;BR /&gt;modeleffects intercept region1 region2 farmarea;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The WARNING message from MI regarding the non-existence of the ML estimates for the LOGISTIC method also may cause a problem that merits your attention.&amp;nbsp; You can try following the suggestion regarding the LIKELIHOOD=AUGMENTED option or simplify the logistic model itself or use the DISCRIM method for all the CLASS variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 18:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741954#M36086</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2021-05-17T18:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741970#M36088</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your reply; I have been troubleshooting this issue for a while and have not had any luck...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried adding the additional datastep to no avail. Additionally, when I substituted the "discrim" method for all class variables, I was getting additional error messages (e.g, "WARNING: The covariates are not specified in an FCS discriminant method for variable&lt;BR /&gt;t1_poverty_2cat, only remaining continuous variables will be used as covariates with&lt;BR /&gt;the default CLASSEFFECTS=EXCLUDE option.") So, changing the function did get rid of the initial error message regarding the non existence of the ML estimates, however, this new error message came up for each class variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my full code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Proc MI imputation;&lt;BR /&gt;proc mi data=combined seed=1180431796 nimpute=10 out=combined_imp_fcs;&lt;BR /&gt;class t1_30grp t1_province t1_10_5cat t1_conchealth t1_poverty_2cat I2 t1_interruption;&lt;BR /&gt;fcs nbiter=10 logistic(t1_conchealth/details) logistic(t1_30grp) logistic(t1_poverty_2cat) regression(oasis) regression(cesd10_resc);&lt;BR /&gt;var covid_weights t1_province t1_10_5cat I2 t1_interruption mos_ss t1_cesd t1_oasis t1_conchealth t1_30grp oasis&lt;BR /&gt;cesd10_resc t1_poverty_2cat;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Proc surveyreg;&lt;BR /&gt;proc surveyreg data=combined_imp_fcs;&lt;BR /&gt;weight covid_weights;&lt;BR /&gt;domain include;&lt;BR /&gt;class t1_30grp (ref='0') t1_province (ref='1') t1_10_5cat (ref='1') t1_conchealth (ref='0') t1_poverty_2cat (ref='0') I2 (ref='1') t1_interruption (ref='4');&lt;BR /&gt;model t1_oasis= t1_province t1_10_5cat I2 t1_interruption mos_ss t1_conchealth t1_30grp oasis cesd10_resc t1_poverty_2cat / solution;&lt;BR /&gt;by _imputation_ ;&lt;BR /&gt;ods output parameterestimates = regparms;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* This step is required for PROC MIANALYZE to correctly combine the results within these groupings;&lt;BR /&gt;proc sort data=regparms;&lt;BR /&gt;by include _imputation_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data regparms2;&lt;BR /&gt;set regparms;&lt;BR /&gt;parameter=compress(parameter);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Proc mianalyze;&lt;BR /&gt;proc mianalyze parms=regparms2;&lt;BR /&gt;class t1_30grp t1_province t1_10_5cat t1_conchealth t1_poverty_2cat I2 t1_interruption;&lt;BR /&gt;by include;&lt;BR /&gt;modeleffects intercept t1_province t1_10_5cat I2 t1_interruption mos_ss t1_conchealth t1_30grp oasis cesd10_resc t1_poverty_2cat;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The proc mianalyze still has the same error message: "ERROR: Variable t1_30grp is not in the PARMS= data set."&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 19:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/741970#M36088</guid>
      <dc:creator>stodo53</dc:creator>
      <dc:date>2021-05-17T19:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/742117#M36100</link>
      <description>&lt;P&gt;Notice that in the example I posted that I do not have the CLASS statement in the MIANALYZE step.&amp;nbsp; Instead, because the variable and the level are now concatenated with the COMPRESS function, the variables names on the MODELEFFECTS statement are also different.&amp;nbsp; It might help to simply Proc PRINT the PARMS= data set after you use the COMPRESS function and then the variables names contained in the variable PARAMETER will be the same ones you use on the MODELEFFECTS statement.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 12:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/742117#M36100</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2021-05-18T12:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Variable X is not in the PARMS= data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/742121#M36101</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That solved the issue. For the MI ANALYZE step, it seems that you cannot use a class statement after using proc surveyreg and instead have to list all categorical variables in the modeleffects statement (except the reference categories).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 13:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Variable-X-is-not-in-the-PARMS-data-set/m-p/742121#M36101</guid>
      <dc:creator>stodo53</dc:creator>
      <dc:date>2021-05-18T13:00:31Z</dc:date>
    </item>
  </channel>
</rss>

