BookmarkSubscribeRSS Feed
Rick_SAS
SAS Super FREQ

> do I have to have it? 

I included that information so that you can easily check the names of the variables in the input matrix. But you can ignore that suggestion if you prefer an alternative. 

Tom
Super User Tom
Super User

Before of course.  Fix the data using normal coding before venturing off into the world of matrix operations.

Tom
Super User Tom
Super User

Fix it before you get into IML.

You have 7 observations and only 6 analysis variables.  If you want to make sure there are 7 analysis variables then just make a new variable that is all missing.

 

In your case you seem to be naming the variable MK1 to MK7 but you didn't create the MK1 variable.

So you can just run this code.

data square;
  length scale $8 mk1-mk7 8 ;
  set psuedo_data;
run;

If you don't know which how many MK variables there should be just first count the number of observations and put it into a macro variable.

proc sql noprint;
select count(*) into :nobs trimmed from psuedo_data;
quit;
data square;
  length scale $8 mk1-mk&nobs 8;
  set psuedo_data;
run;
cleokatt
Calcite | Level 5
yes, that was the problem that my matrix was nx(n-1)

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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