[R] Rsquare n pvalue
Dirk Eddelbuettel
edd at debian.org
Sun Sep 4 01:19:23 CEST 2005
On 3 September 2005 at 17:59, Justin Rhodes wrote:
 Dear Rhelp,

 Can someone please help me discover what function or code will give
 me a pvalue from the input: 1) Rsquare statistic from a simple
 linear regression, and 2) sample size, n

 This would be greatly appreciated. I need this because I am using a
 database that gives me Rsquare and sample size for multiple
 comparisons, and I wish to determine the false discovery rate using
 qvalue. Thanks again,
Do
> example(lm) # just to get an lm object
> str(summary(lm.D9)) # to examine summary of an object
and you'll see that the object returned from summary has the two common R^2
measures, as well as things like residuals from which can compute n quite
easily  which you could obviously also from your regressors and regressand.
> length(summary(lm.D9)$residuals)
Hth, Dirk

Statistics: The (futile) attempt to offer certainty about uncertainty.
 Roger Koenker, 'Dictionary of Received Ideas of Statistics'
More information about the Rhelp
mailing list