Hello everyone,
I am trying to run a macro ,And I use my own data as an input. But I got an error:
ERROR: (execution) Invalid operand to operation.
Any help would greatly appreciated.
I attached the log file, please have a look.
Thankyou,
MIA
The log says that the macro is calling the J function inside the MWVAR function. The J function allocates a matrix. Apparently, the function is being called as
X = j(k, k, value);
where k=0. The J function fails because a valid matrix has k > 0.
Unfortunately, the log does not tell you WHY k is zero. It could be that you've incorrectly specified the arguments to the macro. For example, it might be expecting positive values and your data is negative. Of maybe it is expecting numerical variables and your data is character. I suggest you tun the macro with some valid data and then compare the two data sets to figure out why one works and the other does not. Alternatively, if you can post your data and the macro, someone on the community might be able to assist.
Hi Rick,
Thank you so much, I’ve solve the problem. When I just use 20 data of all this 20000 big data,the procedure worked. I wonder if it is because my data is to big and my laptop couldn't afford to run
Whatever,thank U so.
MIA
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!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.