Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do loop to populate data set / solve regression equation

Status
Not open for further replies.

rickter

Technical User
Jul 15, 2003
1
US
OK - This sounds so simple but I can't seem to find anything on the net... The objective is straight forward:
I need to AUTOMATICALLY create a data set with ONE column, the rows populated with a incremental range... example:

data one;
input X;
cards;
-1
0
1
2
.... etc
I want to use macros to define the min, max and steps...

You see... In a separate data set I have the outputs from a PROC REG equation. I intend to use the Dataset above to solve the equation across the range...

I envision using a DO-LOOP to create the dataset... then input my equation parms via macro, and solve the equation for the range....

Any ideas??

Thanks, Rick
 
Not sure what you mean, here is how to create your data set:

data one;
do i = -1 to 10;
x = i;
output;
end;
keep x;
run;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top