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.
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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.