BookmarkSubscribeRSS Feed
snelliri
Calcite | Level 5
I am having problem with LMS regression problem.

I have setup a work file from a microsoft excel file - homework.xls. The file is two columns (y value is called dSC, x value column is drG1)

I setup the following program in the editor:

data work.homework;

array ab{2} _ALL_;
a=ab[,2]; b=ab[,1];

print "*** Homework LMS regression ***";
optn = j(9,1,.);
optn[2]=3;
optn[3]=3;
optn[8]=3;
call lms(sc,coef,wgt,optn,b,a);

run;


I am getting an error with the array setup portion of the program. Also, I am getting an error where SAS is saying that the LMS subroutine is not setup properly. Any help is greatly appreciated.

Basically, I want to simply run least median regression on a two column dataset from the excel file homework.xls. Nothing fancy. Thanks alot in advance.
1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 865 views
  • 0 likes
  • 2 in conversation