3
$\begingroup$

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?

$\endgroup$

2 Answers 2

4
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

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

proc reg data = data;
model a = b; 
test b=1;
run;
$\endgroup$
1
  • 2
    $\begingroup$ is this a one-sided test? $\endgroup$
    – Macro
    Commented Aug 17, 2011 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.