Solved – In SAS, how to perform a one sided test of the coefficient in a linear regression

Say I have fitted a model using

proc reg data = data;    model a = b;  run; 

How do I test if the coefficient of b is, say, less than 1?

This is in no way specific to SAS but if you have the coefficient estimate, $hat{beta}$ and the standard error, $s$, and you want to test the null hypothesis $H_{0} : beta = beta_{0}$ then the test statistic is

$$ T = frac{ hat{beta} – beta_{0} }{ s } $$

which has a $t$-distribution with $n-2$ degrees of freedom, denoted by $t_{n-2}$. To do a 1-sided test of "greater than" calculate the area to the right of $T$ under the $t_{n-2}$ distribution. Similarly, to do a one-sided test of "less than", calculate the area to the left. To do a two-sided test, find twice the area to the left of $-|T|$. I'm no SAS expert but I believe the areas under the $t$-distribution can be calculated using the tinv() command.

Similar Posts:

Rate this post

Leave a Comment