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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 1210 views
  • 0 likes
  • 2 in conversation