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?
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.
Why not post it at IML forum? @Rick_SAS might give you a hand .
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
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.
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.
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.