BookmarkSubscribeRSS Feed
MIA9510
Calcite | Level 5

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

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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.

MIA9510
Calcite | Level 5

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 runSmiley Very Happy

Whatever,thank U so.

 

MIA

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

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.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 1530 views
  • 0 likes
  • 2 in conversation