Programming the statistical procedures from SAS

Proc MI var statement errors

Reply
New Contributor
Posts: 2

Proc MI var statement errors

Hello everyone,

 

I hope someone can gelp me with proc MI.

 

I'm using SAS ver. 9.2 with Enterprise Guide 4.3.

 

I'm trying to impute missing values for one dependent variable.  I've consulted with subject matter experts in my company, who have agreed that there are five categorical variables and three continuous variables that should be used to model the dependent variable.  None of the explanatory variables have an issue with missing data.

 

For proprietary reasons, I'm renaming the variable names;

 

I tried

class C1 C2 C3 C4 C5;

var Dependent N1 N2 N3 C1 C2 C3 C4 C5;

monotone reg (Dependent=N1 N2 N3 C1 C2 C3 C4 C5);

 

I got the following:

WARNING: The imputed variable Dependent in the MONOTONE statement is the leading variable in the VAR list. Missing values for this variable will not be imputed.

ERROR: The covariate N1 is not in the VAR statement. {I did a direct copy and paste}

 

I removed 'Dependent" from the VAR statement.

 

I got the following:

ERROR: The variable Dependent in the MONOTONE statement is not in the VAR list.

 

I put 'Dependent" back in the VAR statement, as the last variable in the list.

 

I got the following:

 

WARNING: The covariates are not specified in a monotone discriminant method for variable C2, only preceding continuous

variables will be used as covariates.

WARNING: The covariates are not specified in a monotone discriminant method for variable C3, only preceding continuous

variables will be used as covariates.

WARNING: The covariates are not specified in a monotone discriminant method for variable C4, only preceding continuous

variables will be used as covariates.

WARNING: The covariates are not specified in a monotone discriminant method for variable C5, only preceding continuous

variables will be used as covariates.

ERROR: A MONOTONE statement is specified for a data set with a non-monotone missing pattern.

 

I've consulted with a couple of colleagues, who are just as confused as I am.

 

Any help is greatly appreciated.

 

 

 

 

 

SAS Super FREQ
Posts: 3,305

Re: Proc MI var statement errors

Look at the documentation example for the MONOTONE REG method.  The order of the variables that you specify on the VAR statement are important.  Because you are requesting a monotone missing value pattern, it is assumed that the first variables in the VAR statement have nonmissing values and that the missingness increases as you proceed to later variables in the list.  If the only variable that has missing values is Dependent, put that variable last in the VAR statement.

New Contributor
Posts: 2

Re: Proc MI var statement errors

Thanks Rick,

 

Your response caused me to look more closely at my data.  I had one instance where there was a missing value on one of the character variables, even though the dependent variable was NOT missing.  Knowing that, I was able to reach a solution.

Ask a Question
Discussion stats
  • 2 replies
  • 217 views
  • 0 likes
  • 2 in conversation