Description Usage Arguments Examples
Performs a chi-squared test of a count distribution against a vector of probabilities calculated via a monte carlo simulation of distributions under the null hypothesis of poisson or negative binomial expected counts.
1  | chisq_count(x, data = NULL, B = 500, family = c("poisson", "nbinom"))
 | 
x | 
 a vector of count data or a name of a count data column in data  | 
data | 
 a data frame  | 
B | 
 nuber of replicates for simulating the distributions and for calculating the p-value of the chi-squared test if any expected counts are fewer than 5.  | 
family | 
 families for the null hypothesis  | 
1 2 3 4 5  | chisq_count(testdata$extortions, family = "poisson")
# batch using \code{\link{chisq_tb}}
lx <- lapply(c("extortions", "bribes"), chisq_count, testdata, B = 2000, family = "poisson")
chisq_tb(lx, stars = TRUE)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.