Does anyone know how to test whether the differences between two regression models are significant?
For example, I have the dataset as follow:
station year month day Tavg
1 2014 1 1 2.3
1 2014 1 2 3.3
1 2014 1 3 1.3
1 2014 1 4 -0.6
1 2014 1 5 -0.9
1 2014 1 6 2.1
1 2014 1 7 1.8
1 2014 1 8 1.3
1 2014 1 9 2.2
1 2014 1 10 3.2
...
1 2015 1 1 3.2
1 2015 1 2 5.3
1 2015 1 3 2.3
1 2015 1 4 1.4
1 2015 1 5 -2.0
1 2015 1 6 -1.5
1 2015 1 7 0.1
1 2015 1 8 2.3
1 2015 1 9 4.7
1 2015 1 10 5.8
...
2 2014 1 1 6.7
...
First, i did a proc reg for each station and each year(model: Tavg= year), so I have one regression model for each year and each station. Then I want to compare the difference between two regression models under one station to get if it is significant difference between slopes or intercepts. Has anyone know how can I perform this?
Thank you for helps!
This seems to be relevant. http://www.ats.ucla.edu/stat/sas/faq/compreg2.htm
proc mixed ;
class station;
model Tavg = station year year*station / s;
run;
Station effect tells you if the intercepts are different for each station. Year*station tells you if the slopes are different.
To get the unique intercepts and slopes, assuming significance, use
model Tavg = station year*station / noint s;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.