This function runs the chi-square test for continuous or discrete data
chi_test(dta, nbins = c(50, 10), minexpcount = 5, typeTS, ponly = FALSE)
A list with the test statistics, the p value and the degree of freedom for each test
a list with two elements for continuous data or three elements for discrete data, Can also include weights for continuous data
=c(50, 10) number of desired bins
=5 smallest number of counts required in each bin
=5 type of problem, continuous/discrete, with/without weights
Should the p value alone be returned?