0

I would like to know if i can reject, using a linear regression and a t-distribution, the following Null hypothesis:

b=1

where b is the slope of my linear regression. My hypothesis is that b>1.

I am using R, and i know how to test whether my slope is significantly different than 0 but not if it is significantly different than 1!

Thank you for your time.

KatherineD
  • 15
  • 7

1 Answers1

1

You can use pt, which returns a p-value from a t distribution.

You will need to supply the correct quantile and degrees of freedom. For instance, for a two sided test where $\sigma_{\beta1}$ is the estimate of the standard error of the regression line, at a significance level of .05%:

pvalue <- pt(q = (b1 - 1)/sigma_beta1, df = n - 2, lower.tail = FALSE) * 2
Rekyt
  • 103
  • 4
grldsndrs
  • 454
  • 3
  • 11
  • Thank you! Quick question, why did you multiply the whole thing by 2? – KatherineD Nov 11 '16 at 15:46
  • 1
    pt returns a p-value for one tail. Since I am looking for a confidence interval ( two tailed ), I multiplied by 2 so that I could compare the returned p-value with the significance level $\alpha$, so that I could interpret the p-value properly. – grldsndrs Nov 11 '16 at 19:16