Solved – Confidence intervals for frequency tables

bootstrapconfidence intervalr

I am analyzing the results of a survey on R. The questionnaire is a series of questions that participants answer using a Likert scale (https://en.wikipedia.org/wiki/Likert_scale).

I have obtained frequency tables for each question (i.e. what percentage of participants chose "strongly agree", what percentage chose "somewhat agree," etc.) and I am now interested in obtaining confidence intervals for those percentages.

Since I don't want to assume that my data is normally distributed, I was thinking of using bootstrapping to get the confidence intervals. However, I am not entirely sure how using bootstrapping works in this context. I am familiar with how to use bootstrapping when dealing with means, but not really when dealing with frequency tables such as these. Specifically, I am not sure how to go about coding the bootstrapping.

Thank you,
Best,

Best Answer

There are different methods for calculating confidence intervals for proportions without using bootstrapping.

For a multinomial proportion, you might try the methods in the DescTools package.

### Adapted from http://rcompanion.org/handbook/H_02.html

if(!require(DescTools)){install.packages("DescTools")}

library(DescTools)

SA = 10
A  = 9
N  = 20
D  = 5
SD = 1

observed = c(SA, A, N, D, SD)

MultinomCI(observed,
           conf.level=0.95,
           method="sisonglaz")

### Methods: "sisonglaz", "cplus1", "goodman"

   ###              est     lwr.ci    upr.ci
   ### [1,] 0.22222222 0.08888889 0.3807871
   ### [2,] 0.20000000 0.06666667 0.3585648
   ### [3,] 0.44444444 0.31111111 0.6030093
   ### [4,] 0.11111111 0.00000000 0.2696759
   ### [5,] 0.02222222 0.00000000 0.1807871