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

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

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
  • 917 views
  • 0 likes
  • 2 in conversation