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!
See the article "An easy way to run thousands of regressions in SAS" for an example and working code that you can use.
Thank you so much! The article seems like exactly what i want to solve! I will read it to figure out this problem!
Also, see the methods in this note.
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!
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.