'One-sided t-test for OLS regression coefficient in r

I would like to test the following hypothesis in r:

Null hypothesis: beta_1 < 0 Alternative hypothesis: beta_1 <= 0

For this matter, I determined the significance level to be 5 %. Clearly, I just want to reject if the test statistic is very far away to the right in the t-distribution. I calculated a regression function and saved the results of the regression model with ols2. I entered the following code to perform a t-test on coefficient of interest:

summary(ols2)$coefficients[2] < qnorm(0.05, lower.tail = FALSE)

I am not sure how to interpret lower.tail. Is lower.tail referring to the rejection area when TRUE? And how do I know that the actually implemented H0 is actually beta_1 < 0 and not beta_1 = 0?

Best,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source