Description Usage Arguments Value Author(s) Examples
Calculate the chi-squared goodness of fit value from a random variable and a vector with the probabilities for the outcome for the variable.
1  | chi.goodness(x, p)
 | 
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  | 
Returns the chi-squared goodness of fit value.
Tobias Mortensen 
Department of mathematics and computer science (IMADA) 
University of southern Denmark, Odense 
tomor14@student.sdu.dk 
1  | chi.goodness(x=c(1,3,4,1,2),p=c(.2,.3,.1,.2,.2))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.