turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- proc syslin SUR -- how to choose a subset of the f...

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-20-2016 03:44 AM

I ran a cross-sectional regression (across 500 stocks) for a particular month. It is repeated for other 60 months (say yymonth is 201001-201512). Then, the average (across time) coefficients are calculated.

proc reg data=a outest=b tableout noprint;

model y = x1 x2 x3 / adjrsq ;

output out=RES r=rRESID;

by yymonth;

Now I need to run proc syslin SUR grouping all the 60 months together.

Does anyone know how to 'choose' a month's data into each model equation? I think the code goes like this:

proc syslin data = a sur;

model1: model y = x1 x2 x3; <----this one include only 2010Jan

model2: model y = x1 x2 x3; <----this one include only 2010Feb

...

model60: model y = x1 x2 x3; <----this one include only 2015Dec

run;

Thanks for your help!!

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-28-2016 09:41 AM

Wouldn't a BY statement be sufficient to accomplish this? In fact, the same BY statement that you used in PROC REG looks like it ought to work.

Steve Denham