chi.gof: Chi-squared Goodness of Fit test

Description Usage Arguments Value Author(s) Examples

Description

This function takes 1 or 2 arguments to calculate the chi squared goodness of fit value from these arguments.

Usage

1
chi.gof(x,p)

Arguments

x

is a categorical variable vector of numbers, counting number of each incident.

p

is an optional vector of probabilities. If unused, replaced by a uniformly distributed vector of probabilities.

Value

returns the Chi-squared goodness of fit value, calculated using Pearson's Chi-squared test

Author(s)

Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk

Examples

1
2
#Add examples for the function to explain to others how they can be used
chi.gof(c(1,2,3),c(0.25,0.6,0.15))

Chaiji/ChaijiExamST522 documentation built on May 6, 2019, 9:55 a.m.