BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Alain38
Quartz | Level 8

@PaigeMiller@Rick_SASThank you very much for help, I have now more elements to decide.

 

Don't compute the regression for this data, instead print an error message of some sort.

Knowing that I have a loop, how can I say: "If the X'X matrix is singular, then do not abort but write for example #N/A" so that when I look at the output table, I can see that for, let say t = 350 and t = 580, the matrix was not singular and these particular data points will not be used ?

 

Rick_SAS
SAS Super FREQ

if abs(det(A)) < 1e-8 then 

   /* handle singular case */

else

   /* handle nonsingular case */

  

Rick_SAS
SAS Super FREQ

For more about generalized inverses and solving the rank-deficient regression problem, see the articles

"Generalized inverses for matrices" and

"Singular parameterizations, generalized inverses, and regression estimates"

 

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
  • 17 replies
  • 3069 views
  • 6 likes
  • 3 in conversation