0

My is $H_0: \beta = 0$ and my $H1: \beta <0$

I want to run a regression in Rstudio and do this with the following command:

model <- lm(Y~independentvariables) 
summary(model)

However, I get the t-value of the right tail but my hypothesis is the opposite. I mean that I want the t-value of the left tail. I was wondering which argument I should add to obtain this? I hope someone can help me with this..

Jeremy Miles
  • 17,812

1 Answers1

1

The p-values in summary(model) are for the two-sided hypothesis test, not for the right tailed test. You can perform the one-sided test by calculating the p-value for it. From the summary, you can obtain the t-statistic sa t.st and the degrees of freedom say df.t, and then use:

pt(t.st, df = df.t, lower = TRUE)

This will give you the p-value for the left tailed test.

More details here: If and how to use one-tailed testing in multiple regression

blooraven
  • 429