BookmarkSubscribeRSS Feed
ronaldo7
Calcite | Level 5

The error message I receive when I use PROC MIANALYZE reads:

ERROR: Within-imputation StdErr missing for variable  in _Imputation_= 1 in the input PARMS= data set.

 

I am using data from one of the National Health Interview Surveys. I have the full dataset already loaded. Here is my code working through the multiple imputation, proc surveylogistic, and then proc mianalyze:

*Imputation phase*;
proc mi data=nhis nimpute=5 out=mi_fcs ;
class HeartDisease SexualOrientation Sex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance URBRRL REGION;
fcs plots=trace(mean std); 
var HeartDisease AGEP_A SexualOrientation Sex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance URBRRL REGION;
fcs discrim(HeartDisease SexualOrientation Sex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance URBRRL REGION /classeffects=include) nbiter =10 ; 
run;


*Analysis phase*;
proc surveylogistic data = mi_fcs ;
	strata pstrat;
	cluster ppsu;
	weight WTFA_A;
	class SexualOrientation(ref='2') Sex RaceEthnicity(ref="2") Education IncomePovertyRatio BMICategory(ref="2") 
		HealthInsurance URBRRL REGION / param=glm;
	model HeartDisease(event='1') = SexualOrientation AGEP_A Sex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance
		URBRRL REGION;
	by _imputation_;
	ods output ParameterEstimates=a_mvn;
run;
quit;



*Compress data to avoid issues*;
data a_mvn;
set a_mvn;
parameter=compress(parameter);
run;


*Pooling phase*;
proc mianalyze parms=a_mvn;
MODELEFFECTS INTERCEPT AGEP_A SexualOrientation Sex RaceEthnicity Education IncomePovertyRatio BMICategory 
		HealthInsurance URBRRL REGION;
RUN;

I have no issues until running PROC MIANALYZE and then I receive the error message: "ERROR: Within-imputation StdErr missing for variable in _Imputation_= 1 in the input PARMS= data set."

 

 

I double checked and values for StdErr are present for all variable in _Imputation_=1 with the code:

proc print data = a_mvn;
where _imputation_ = 1;
run;

I would really appreciate your help with this!  I have been spending so long trying to complete multiple imputation for this analysis, and I have no clue how to move forward with this error. I tried searching for results online. Some people resolved this issue by shortening their variable names if they were >20 characters, but none of my variable names are >20 characters. Any help or advice would be greatly appreciated! Thank you!

2 REPLIES 2
Season
Lapis Lazuli | Level 10

Check the output dataset from the SURVEYLOGISTIC procedure to see if it contains a column of standard errors. If not, add the COVB option in the MODEL statement after the slash.

Like this:


@ronaldo7 wrote:
*Other commands omitted*;
	model HeartDisease(event='1') = SexualOrientation AGEP_A Sex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance
		URBRRL REGION/covb;
	by _imputation_;
	ods output ParameterEstimates=a_mvn;
run;
quit;

SAS_Rob
SAS Employee

You should remove the data step in between SURVEYLOGISTIC and MIANALYZE as it is causing the issue because you are using PARAM=GLM which has a missing standard error.  This step is unnecessary if you use the CLASS statement in MIANALYZE along with the CLASSVAR=CLASSVAL sub-option.

 

 

 

proc mianalyze parms(classvar=classval)=a_mvn;
class SexualOrientationSex RaceEthnicity Education IncomePovertyRatio BMICategory HealthInsurance URBRRL REGION;
MODELEFFECTS INTERCEPT AGEP_A SexualOrientation Sex RaceEthnicity Education IncomePovertyRatio BMICategory  HealthInsurance URBRRL REGION;
run;

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 678 views
  • 2 likes
  • 3 in conversation