错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Categorical Data

  • Jim Albert,
  • Maria Rizzo

摘要

Categorical data can be character or factor type, requiring different methods than one uses to analyze quantitative data. In this chapter we focus on methods for tabulating, summarizing, and graphing categorical data. Contingency tables to compare two categorical data samples and a chi-square test for association are discussed. Plots and a chi-square goodness-of-fit test help to compare a sample to a known probability distribution. Methods for graphing patterns of association such as segmented bar charts, side-by-side barplots, and mosaic plots are included. Several other types of plots for categorical data using base R graphics and ggplot graphics are illustrated in the context of these examples.