<?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 Error message with proc mianalyze in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-message-with-proc-mianalyze/m-p/934642#M367516</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the National Survey of Children's Health (NSCH) 2020, 2021, and 2022 datasets for an analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I am trying to use multiple imputation for federal poverty level (FPL) variable. From there, I was trying to construct a multivariate logistic regression model to estimate adjusted odds ratios with 95% confidence intervals and P values. However, when I try to run the proc mianalyze statement, I obtain the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=""&gt;Within-imputation StdErr missing for variable estimate in _Imputation_= 4 in the input DATA= data set.&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data stacked;
set work.nsch20_22;
array fpli{6} fpl_i1-fpl_i6;
do _Imputation_=1 to 6;
fpl_i=fpli{_Imputation_};

if fpl_i &amp;lt; 100 then povcat_i = 1;
if 100&amp;lt;=fpl_i&amp;lt;200 then povcat_i = 2;
if 200&amp;lt;=fpl_i&amp;lt;400 then povcat_i = 3;
if fpl_i&amp;gt;=400 then povcat_i = 4;
output;
end;
run;


proc sort data=stacked;
by _Imputation_;
run;



proc surveylogistic data=stacked;
	strata stratum fipsst; 
	cluster hhid;
	weight fwc20_22;
	by _Imputation_; 
	class AgeCategory Sex_Logistic Race_Logistic BORNUSA_Logistic CURRINS_Logistic 
		YEAR SC_HISPANIC_R HIGRADE_TVIS povcat_i / param=glm;
	model SickleCell_Binary(event='1')=AgeCategory Sex_Logistic SC_HISPANIC_R Race_Logistic 
		povcat_i HIGRADE_TVIS BORNUSA_Logistic CURRINS_Logistic YEAR / link=logit 
	technique=fisher;
ods output parameterestimates = parms ; 
run;



proc sort data=work.parms;
by _imputation_; *NOTE: if I ever add the response variable (SickleCell_Binary) in the BY statement, an error message will appear that the response variable cannot be found in the dataset, so I have been only keeping _imputation_ in the BY statement. Is this the source of the problem/can you help me with this please?;
run;



proc mianalyze data=parms;
modeleffects estimate;
stderr stderr;
ods output parameterestimates=MI_parms;
run;  *NOTE: this is when I receive the error message that the within-imputation StdErr is missing;



data OR;
set MI_parms;
OR=exp(estimate);
lower_or=exp(LCLMean);
upper_or=exp(UCLMean);
keep comparison OR lower_or upper_or;
run;  *NOTE: I have never been able to get to this set of code. However, would this code give me adjusted odds ratios with 95% confidence intervals along with P values??;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2024 01:07:47 GMT</pubDate>
    <dc:creator>ronaldo7</dc:creator>
    <dc:date>2024-07-04T01:07:47Z</dc:date>
    <item>
      <title>Error message with proc mianalyze</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-with-proc-mianalyze/m-p/934642#M367516</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the National Survey of Children's Health (NSCH) 2020, 2021, and 2022 datasets for an analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I am trying to use multiple imputation for federal poverty level (FPL) variable. From there, I was trying to construct a multivariate logistic regression model to estimate adjusted odds ratios with 95% confidence intervals and P values. However, when I try to run the proc mianalyze statement, I obtain the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=""&gt;Within-imputation StdErr missing for variable estimate in _Imputation_= 4 in the input DATA= data set.&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data stacked;
set work.nsch20_22;
array fpli{6} fpl_i1-fpl_i6;
do _Imputation_=1 to 6;
fpl_i=fpli{_Imputation_};

if fpl_i &amp;lt; 100 then povcat_i = 1;
if 100&amp;lt;=fpl_i&amp;lt;200 then povcat_i = 2;
if 200&amp;lt;=fpl_i&amp;lt;400 then povcat_i = 3;
if fpl_i&amp;gt;=400 then povcat_i = 4;
output;
end;
run;


proc sort data=stacked;
by _Imputation_;
run;



proc surveylogistic data=stacked;
	strata stratum fipsst; 
	cluster hhid;
	weight fwc20_22;
	by _Imputation_; 
	class AgeCategory Sex_Logistic Race_Logistic BORNUSA_Logistic CURRINS_Logistic 
		YEAR SC_HISPANIC_R HIGRADE_TVIS povcat_i / param=glm;
	model SickleCell_Binary(event='1')=AgeCategory Sex_Logistic SC_HISPANIC_R Race_Logistic 
		povcat_i HIGRADE_TVIS BORNUSA_Logistic CURRINS_Logistic YEAR / link=logit 
	technique=fisher;
ods output parameterestimates = parms ; 
run;



proc sort data=work.parms;
by _imputation_; *NOTE: if I ever add the response variable (SickleCell_Binary) in the BY statement, an error message will appear that the response variable cannot be found in the dataset, so I have been only keeping _imputation_ in the BY statement. Is this the source of the problem/can you help me with this please?;
run;



proc mianalyze data=parms;
modeleffects estimate;
stderr stderr;
ods output parameterestimates=MI_parms;
run;  *NOTE: this is when I receive the error message that the within-imputation StdErr is missing;



data OR;
set MI_parms;
OR=exp(estimate);
lower_or=exp(LCLMean);
upper_or=exp(UCLMean);
keep comparison OR lower_or upper_or;
run;  *NOTE: I have never been able to get to this set of code. However, would this code give me adjusted odds ratios with 95% confidence intervals along with P values??;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 01:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-with-proc-mianalyze/m-p/934642#M367516</guid>
      <dc:creator>ronaldo7</dc:creator>
      <dc:date>2024-07-04T01:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with proc mianalyze</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-message-with-proc-mianalyze/m-p/934646#M367518</link>
      <description>It looks like you have all the same value for variable "estimate" at _Imputation_= 4 after PROC LOGISTIC.&lt;BR /&gt;a.k.a "estimate" 's std=0 .</description>
      <pubDate>Thu, 04 Jul 2024 02:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-message-with-proc-mianalyze/m-p/934646#M367518</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-07-04T02:33:31Z</dc:date>
    </item>
  </channel>
</rss>

