BookmarkSubscribeRSS Feed
KeithJS
Calcite | Level 5

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.

 

 

 

 

 

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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.

KeithJS
Calcite | Level 5

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4645 views
  • 1 like
  • 2 in conversation