BookmarkSubscribeRSS Feed
Dart246
Calcite | Level 5

Good Evening All,

For the past thee hours I have been working on a problem that I just can not seem to understand. With no dataset or really any information (such as X and Y values) I am at a loss.

The problem:

Write a macro to fit a multiple regression model where Y is identified as one macro variable, and each X is identified as another macro variable.

There is more to the problem, but once I understand that I feel I can complete the rest.


So far I have been thinking;

% macro exercise(x, y);

%let x = value 1;

%let y = value 2;


The second part of the problem is:


Your macro should do the following:
a. Fit the model.
b. Plot the residuals versus each X.
c. Plot the residuals versus Y.


So from here I'm thinking:

%let x = value 1;

%let y = value 2;

% macro exercise(x, y, proc sgplot data = abc, scatter x=y, y=residual_q);


But I am completely off base here I feel and have no idea what to do.

2 REPLIES 2
Reeza
Super User

You are a bit off base, but it also sounds like homework.

See here for some pointers. 

http://www.ats.ucla.edu/stat/sas/seminars/sas_macros_introduction/default.htm

Tom
Super User Tom
Super User

Seems to me that you first need to understand how to perform the requested analysis and produce the proper outputs.  Then you can worry about how to convert it so that it is "macrotized".

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 721 views
  • 0 likes
  • 3 in conversation