BookmarkSubscribeRSS Feed
shl007
Obsidian | Level 7

I saw this post Re: the MCAR macro. I was trying it but came across the following error and didn't see any discussion on this particular error. Any ideas where to look?

 

Solved: Little's MCAR macro - Page 2 - SAS Support Communities

 

 NOTE: IML Ready
 ERROR: (execution) Invalid argument or operand; contains missing values.
 
  operation : * at line 619 column 1
  operands  : mu, Dj
 mu      1 row     179 cols    (numeric)
 Dj    179 rows     83 cols    (numeric)
 
  statement : ASSIGN at line 619 column 1
 NOTE: Line generated by the invoked macro "MCARTEST".
 619        @put (m[i,]) 6.0
 
 _                                                                                                                                   
 
 180
 ERROR 180-322: Statement is not valid or it is used out of proper order.

 

2 REPLIES 2
Rick_SAS
SAS Super FREQ

The error message tells you that the program is trying to compute the quantity

muobsj = mu * Dj;

and one of the quantities on the left hand side (probably mu) contains a missing value.

 

I am not familiar with the macro, but it looks like mu is the first column of the estimate covariance matrix that PROC MI creates by using the statement

EM outem = emcov;

so check the 'emcov' data set. The covariance matrix should never contain a missing value, so probably the way you are calling the macro is incorrect.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 927 views
  • 0 likes
  • 3 in conversation