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
- /
- Analytics
- /
- Stat Procs
- /
- Regression for several models

Topic Options

- Subscribe to 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-28-2017 10:56 AM

Hi,

Can anyone tell me how to do the regression of different models?

I have a dataset like this:

id year V1 V2 V3 V4 ... V30

1 2011 30 20 55 28 ... 50

2 2011 28 12 76 13 ... 35

3 2011 46 22 58 12 ... 46

1 2012

2 2012

3 2012

1 2013

2 2013

3 2013

I want to do the regression for model V1= year, V2=year,... and V30=year, and by id. And I hope to get the slope, intercept, R2, and p-value of these 30 models.

Thank you!

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

02-28-2017 11:13 AM

See the article "An easy way to run thousands of regressions in SAS" for an example and working code that you can use.

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

Posted in reply to Rick_SAS

03-01-2017 11:32 AM

Thank you so much! The article seems like exactly what i want to solve! I will read it to figure out this problem!

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

02-28-2017 11:37 AM

Also, see the methods in this note.

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

Posted in reply to StatDave_sas

03-01-2017 11:35 AM

Yes! It seems like I need to use a macro procedure to deal with this problem.This note will help a lot! Thank you for help!