3

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?

Jeromy Anglim
  • 44,984
xiaodai
  • 736

2 Answers2

3

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.

Macro
  • 44,826
3

Use the TEST statement. So for your example you would have:

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