bayesian_chi_squared_test: Bayesian Chi-squared test

Description Usage Arguments Value

View source: R/bayesian_chi_squared_test.R

Description

Bayesian Chi-squared test

Usage

1
2
3
4
5
6
7
8
bayesian_chi_squared_test(
  y,
  distribution_fun,
  params,
  data_type = "continuous",
  censored = NULL,
  chisq_quantile = 0.95
)

Arguments

y

Independent and identically distributed samples drawn from a given distribution

distribution_fun

The cumulative distribution function of the model posterior.

params

Randomly sampled draws of from the parameters posterior distribution.

data_type

There are three choices of data_type; "continuous", "discrete", and "censored".

censored

A vector the same length as y indicating whether the data is censored.

chisq_quantile

Quantile of the Chi-squared distribution to be used in the test.

Value

The proportion of R^b values that exceed the specified critical value from their known Chi-squared reference distribution.


a-segar/foocafeReliability documentation built on Feb. 28, 2020, 5:47 a.m.