Computes a confidence interval for a population Cramer's V coefficient of nominal association for an r x s contingency table and its approximate standard error. The confidence interval is based on a noncentral chi-square distribution, and an approximate standard error is recovered from the confidence interval.
ci.cramer(alpha, chisqr, r, c, n)
alpha value for 1-alpha confidence
Pearson chi-square test statistic of independence
number of rows in contingency table
number of columns in contingency table
sample size
Returns a 1-row matrix. The columns are:
Estimate - estimate of Cramer's V
SE - recovered standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Smithson M (2003). Confidence Intervals. Sage.
ci.cramer(.05, 19.21, 2, 3, 200)
#> Estimate SE LL UL
#> 0.3099 0.0718 0.1601 0.4417
# Should return:
# Estimate SE LL UL
# 0.3099 0.0718 0.1601 0.4417