Description Usage Arguments Details Value Note Author(s) See Also Examples
These functions use the beta distribution to provide the R Squared distribution.
1 2 3 4 |
x, q |
Vector of quantiles, or, in other words, the value(s) of R Squared. |
p |
Vector of probabilites (p-values). |
nPredictors |
The number of predictors. |
sampleSize |
The sample size. |
n |
The number of R Squared values to generate. |
populationRsq |
The value of R Squared in the population; this determines the center of the R Squared distribution. This has not been implemented yet in this version of |
lower.tail |
logical; if TRUE (default), probabilities are the likelihood of finding an R Squared smaller than the specified value; otherwise, the likelihood of finding an R Squared larger than the specified value. |
The functions use convert.omegasq.to.f
and convert.f.to.omegasq
to provide the Omega Squared distribution.
dRsq
gives the density, pRsq
gives the distribution function, qRsq
gives the quantile function, and rRsq
generates random deviates.
These functions are based on the Stack Exchange (Cross Validated) post at http://stats.stackexchange.com/questions/130069/what-is-the-distribution-of-r2-in-linear-regression-under-the-null-hypothesis. Thus, the credits go to Alecos Papadopoulos, who provided the answer that was used to write these functions.
Gjalt-Jorn Peters (based on a CrossValidated answer by Alecos Papadopoulos)
Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>
1 2 3 4 5 6 7 8 9 10 11 | ### Generate 10 random R Squared values
### with 2 predictors and 100 participants
rRsq(10, 2, 100);
### Probability of finding an R Squared of
### .15 with 4 predictors and 100 participants
pRsq(.15, 4, 100, lower.tail = FALSE);
### Probability of finding an R Squared of
### .15 with 15 predictors and 100 participants
pRsq(.15, 15, 100, lower.tail=FALSE);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.