priorRho | R Documentation |
Prior for Pearson's rho
priorRho(rho, kappa = 1, alternative = "two.sided", betaA = NULL, betaB = NULL)
rho |
numeric in (-1, 1) at which the prior needs to be evaluated |
kappa |
numeric > 0 which provides the scale of |
alternative |
a character string specifying the alternative hypothesis must be one of "two.sided" (default), "greater" or "less" |
numeric, the density value at rho
priorRho(0.4)
rhoDomain <- seq(-0.99, 0.99, by=0.01)
# kappa <- 1 refers to the uniform distribution
priorRho(rhoDomain)
# kappa <- 2, e.g., beta(1/2, 1/2), is needed for information consistency
yLine <- priorRho(rhoDomain, kappa=2)
graphics::plot(rhoDomain, yLine, type="l")
# kappa <- 1 refers to the uniform distribution, but "greater" truncates it
yLine <- priorRho(rhoDomain, alternative="greater")
graphics::plot(rhoDomain, yLine, type="l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.