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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.