Quoting Ranjan Maitra <[EMAIL PROTECTED]>: > Yes, of course! Thank you. So, I guess the answer is that R itself > can not be made to do so directly. > > Many thanks for confirming this. > > Sincerely, > Ranjan > > On Wed, 21 Feb 2007 20:23:55 +0000 (GMT) Prof Brian Ripley > <[EMAIL PROTECTED]> wrote: > >> On Wed, 21 Feb 2007, Ranjan Maitra wrote: >> >> > I was wondering if it is possible to get the p-values for one-sided >> > tests on the parameters of a linear regression. >> > >> > For instance, I use lm() and store the result in an object. lm() gives >> > me a matrix, using summary() and coef() on which gives me a matrix >> > containing the coefficients, the standard errors, the t-statistics and >> > the two-sided p-values by default. Can I get it to provide me with >> > one-sided p-values (something like alternative less than or greater >> > than)? >> >> Not 'it', but you can easily do the calculation yourself from the output. >> E.g. >> >> example(lm) >> s <- summary(lm.D90) >> pt(coef(s)[, 2], s$df[2], lower=FALSE) # or TRUE
I think it should be pt(coef(s)[, 3], s$df[2], lower=FALSE) # or TRUE ^ Best, Dimitris >> >> -- >> Brian D. Ripley, [EMAIL PROTECTED] >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.