Skip to content
Back to formatted view

Raw Message

Message-ID: <4E4F195F.4070808@xtra.co.nz>
Date: 2011-08-20T02:18:07Z
From: Rolf Turner
Subject: Calculating p-value for 1-tailed test in a linear model
In-Reply-To: <003401cc5ebe$38badfb0$aa309f10$@edu>

On 20/08/11 10:20, Andrew Campomizzi wrote:
> Hello,
>
> I'm having trouble figuring out how to calculate a p-value for a 1-tailed
> test of beta_1 in a linear model fit using command lm.  My model has only 1
> continuous, predictor variable.  I want to test the null hypothesis beta_1
> is>= 0.  I can calculate the p-value for a 2-tailed test using the code
> "2*pt(-abs(t-value), df=degrees.freedom)", where t-value and degrees.freedom
> are values provided in the summary of the lm.  The resulting p-value is the
> same as provided by the summary of the lm for beta_1.  I'm unsure how to
> change my calculation of the p-value for a 1-tailed test.
>
> Thanks for your assistance,
>
> Andy

The r-help mailing list is *not* for giving assistance with homework.

     cheers,

         Rolf Turner