chisq_pval: Visualization of p-values for basic hypothesis tests with the...

Description Usage Arguments Details Value Author(s) Examples

View source: R/chisq.R

Description

Given χ2 ~ χ2(df) the function calculates the p-value and visualizes the result as the area under the density function. Furthermore the mean and the values one and two standard deviations from the mean are highlighted.

Usage

1
chisq_pval(chisq_value = 4, df = 1)

Arguments

chisq_value

The value of a test statistic with the underlying χ2 distribution

(values that are very far away from the mean - roughly more than 4 times the standard deviation - are not recommend to use as the p-value will be approximately 0 or 1 anyways)

df

The degree of freedom of the underlying χ2 distribution (only df greater than 0).

Details

The p-value will be calculated by P(X>χ2) given X ~ χ2(df).

Value

a ggplot2 object displaying the results

Author(s)

Emanuel Sommer

Examples

1
2
chisq_pval()
chisq_pval(chisq_value = 23, df = 15)

EmanuelSommer/PvalVis documentation built on Nov. 20, 2020, 1:34 a.m.