BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Daniel_MM
Calcite | Level 5

I have a data set that has the form:

 

a=N x M data set (N>M)

and

b=NxP data set 

which forms an equation 

aX=b, 

 

to solve this I am using the IML echelon function, but unfortunately my data does not seem to be perfect (possible rounding errors) as the echelon over solves my matrix [a|b] and row reduces too far, is there a possible way to identify what rows to pick so that I could do an inversion solve or to truncate the variables to ensure rounding errors are not an issue?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Daniel_MM
Calcite | Level 5

I have verified that the equations have a unique solution, but unfortunately some variables only have a few entries in the entire system so I cant just take a random set of rows, I am attempting to use a Moore-Penrose generalised inverse to solve the system which seems to be working, thanks for the swift reply though, great to see the community so active.

View solution in original post

5 REPLIES 5
Ksharp
Super User

Why not post it at IML forum? @Rick_SAS might give you a hand .

Ksharp
Super User
Could post a real example ,include the data you have and the answer you want to see ?
Rick_SAS
SAS Super FREQ

If N > M  (more rows than columns), then the system is almost surely overdetermined and you need to compute a least squares solution.

There are many ways to solve least squares systems. A few are discussed here:
On solving rank-deficient systems of equations in SAS - The DO Loop

 

Daniel_MM
Calcite | Level 5

I have verified that the equations have a unique solution, but unfortunately some variables only have a few entries in the entire system so I cant just take a random set of rows, I am attempting to use a Moore-Penrose generalised inverse to solve the system which seems to be working, thanks for the swift reply though, great to see the community so active.

Rick_SAS
SAS Super FREQ

PS: If your data matrix really does have a unique solution to Ax=b, then you can use ANY set of M rows to find x.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2664 views
  • 2 likes
  • 3 in conversation