chi.goodness: Chi-squared goodness of fit

Description Usage Arguments Value Author(s) Examples

Description

Calculate the chi-squared goodness of fit value from a random variable and a vector with the probabilities for the outcome for the variable.

Usage

1

Arguments

x

is a categorical variable. It has to be numeric

p

is the probability of all outcomes of x. If p is not given, the outcome has uniform probability. It has to be numeric

Value

Returns the chi-squared goodness of fit value.

Author(s)

Tobias Mortensen
Department of mathematics and computer science (IMADA)
University of southern Denmark, Odense
tomor14@student.sdu.dk

Examples

1
chi.goodness(x=c(1,3,4,1,2),p=c(.2,.3,.1,.2,.2))

tomor14/Examst522 documentation built on May 31, 2019, 6:20 p.m.