priorRho: Prior for Pearson's rho

View source: R/pearson.R

priorRhoR Documentation

Prior for Pearson's rho

Description

Prior for Pearson's rho

Usage

priorRho(rho, kappa = 1, alternative = "two.sided", betaA = NULL, betaB = NULL)

Arguments

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"

Value

numeric, the density value at rho

Examples

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")

AlexanderLyNL/bstats documentation built on Sept. 11, 2023, 4:10 p.m.