Programming the statistical procedures from SAS

How to test whether the differences between two regression models are significant?

Reply
Contributor hua
Contributor
Posts: 25

How to test whether the differences between two regression models are significant?

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!

 

 

Respected Advisor
Posts: 3,124

Re: How to test whether the differences between two regression models are significant?

Valued Guide
Valued Guide
Posts: 679

Re: How to test whether the differences between two regression models are significant?

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;

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 213 views
  • 2 likes
  • 3 in conversation