BookmarkSubscribeRSS Feed
hua
Obsidian | Level 7 hua
Obsidian | Level 7

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!

4 REPLIES 4
Rick_SAS
SAS Super FREQ

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

hua
Obsidian | Level 7 hua
Obsidian | Level 7

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

StatDave
SAS Super FREQ

Also, see the methods in this note

hua
Obsidian | Level 7 hua
Obsidian | Level 7

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!

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1284 views
  • 0 likes
  • 3 in conversation