369,99 zł
Introduces the key concepts in the analysis of categoricaldata with illustrative examples and accompanying R code This book is aimed at all those who wish to discover how to analyze categorical data without getting immersed in complicated mathematics and without needing to wade through a large amount of prose. It is aimed at researchers with their own data ready to be analyzed and at students who would like an approachable alternative view of the subject. Each new topic in categorical data analysis is illustrated with an example that readers can apply to their own sets of data. In many cases, R code is given and excerpts from the resulting output are presented. In the context of log-linear models for cross-tabulations, two specialties of the house have been included: the use of cobweb diagrams to get visual information concerning significant interactions, and a procedure for detecting outlier category combinations. The R code used for these is available and may be freely adapted. In addition, this book: * Uses an example to illustrate each new topic in categorical data * Provides a clear explanation of an important subject * Is understandable to most readers with minimal statistical and mathematical backgrounds * Contains examples that are accompanied by R code and resulting output * Includes starred sections that provide more background details for interested readers Categorical Data Analysis by Example is a reference for students in statistics and researchers in other disciplines, especially the social sciences, who use categorical data. This book is also a reference for practitioners in market research, medicine, and other fields.
Ebooka przeczytasz w aplikacjach Legimi na:
Liczba stron: 255
GRAHAM J. G. UPTON
Copyright © 2017 by John Wiley & Sons, Inc. All rights reserved.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.
Library of Congress Cataloging-in-Publication Data
Names: Upton, Graham J. G., author. Title: Categorical data analysis by example / Graham J.G. Upton. Description: Hoboken, New Jersey : John Wiley & Sons, 2016. | Includes index. Identifiers: LCCN 2016031847 (print) | LCCN 2016045176 (ebook) | ISBN 9781119307860 (cloth) | ISBN 9781119307914 (pdf) | ISBN 9781119307938 (epub)
Subjects: LCSH: Multivariate analysis. | Log-linear models. Classification: LCC QA278 .U68 2016 (print) | LCC QA278 (ebook) | DDC 519.5/35–dc23 LC record available at https://lccn.loc.gov/2016031847
Preface
Acknowledgments
Chapter 1: Introduction
1.1 What are Categorical Data?
1.2 A Typical Data Set
1.3 Visualization and Cross-Tabulation
1.4 Samples, Populations, and Random Variation
1.5 Proportion, Probability, and Conditional Probability
1.6 Probability Distributions
1.7 *The Likelihood
Chapter 2: Estimation and Inference for Categorical Data
2.1 Goodness of Fit
2.2 Hypothesis Tests for a Binomial Proportion (Large Sample)
2.3 Hypothesis Tests for a Binomial Proportion (Small Sample)
2.4 Interval Estimates for a Binomial Proportion
References
Chapter 3: The 2 × 2 Contingency Table
3.1 Introduction
3.2 Fisher’s Exact Test (For Independence)
3.3 Testing Independence with Large Cell Frequencies
3.4 The 2 × 2 Table in a Medical Context
3.5 Measuring Lack of Independence (Comparing Proportions)
References
Chapter 4: The
I
×
J
Contingency Table
4.1 Notation
4.2 Independence in the
I
×
J
Contingency Table
4.3 Partitioning
4.4 Graphical Displays
4.5 Testing Independence with Ordinal Variables
References
Chapter 5: The Exponential Family
5.1 Introduction
5.2 The Exponential Family
5.3 Components of a General Linear Model
5.4 Estimation
References
Chapter 6: A Model Taxonomy
6.1 Underlying Questions
6.2 Identifying the Type of Model
Chapter 7: The 2 ×
J
Contingency Table
7.1 A Problem with
X
2
(And
G
2
)
7.2 Using the Logit
7.3 Individual Data and Grouped Data
7.4 Precision, Confidence Intervals, and Prediction Intervals
7.5 Logistic Regression with a Categorical Explanatory Variable
References
Chapter 8: Logistic Regression with Several Explanatory Variables
8.1 Degrees of Freedom when there are no Interactions
8.2 Getting a Feel for the Data
8.3 Models with two-Variable Interactions
Chapter 9: Model Selection and Diagnostics
9.1 Introduction
9.2 Notation for Interactions and for Models
9.3 Stepwise Methods for Model Selection Using
G
2
9.4 AIC and Related Measures
9.5 The Problem Caused by Rare Combinations of Events
9.6 Simplicity Versus Accuracy
9.7 DFBETAS
References
Chapter 10: Multinomial Logistic Regression
10.1 A Single Continuous Explanatory Variable
10.2 Nominal Categorical Explanatory Variables
10.3 Models for an Ordinal Response Variable
References
Chapter 11: Log-Linear Models for
I
×
J
Tables
11.1 The Saturated Model
11.2 The Independence Model for an
I
×
J
Table
Chapter 12: Log-Linear Models for
I
×
J
×
K
Tables
12.1 Mutual Independence:
A
/
B
/
C
12.2 The Model
AB
/
C
12.3 Conditional Independence and Independence
12.4 The Model
AB
/
AC
12.5 The Models
AB
/
AC
/
BC
and
ABC
12.6 Simpson’s Paradox
12.7 Connection between Log-Linear Models and Logistic Regression
Reference
Chapter 13: Implications and Uses of Birch’s Result
13.1 Birch’s Result
13.2 Iterative Scaling
13.3 The Hierarchy Constraint
13.4 Inclusion of the All-Factor Interaction
13.5 Mostellerizing
References
Chapter 14: Model Selection for Log-Linear Models
14.1 Three Variables
14.2 More than Three Variables
Reference
Chapter 15: Incomplete Tables, Dummy Variables, and Outliers
15.1 Incomplete Tables
15.2 Quasi-Independence
15.3 Dummy Variables
15.4 Detection of Outliers
Chapter 16: Panel Data and Repeated Measures
16.1 The Mover-Stayer Model
16.2 The Loyalty Model
16.3 Symmetry
16.4 Quasi-Symmetry
16.5 The Loyalty-Distance Model
References
Appendix: R Code for Cobweb Function
Index
Author Index
Index of Examples
EULA
Chapter 1
Table 1.1
Table 1.2
Table 1.3
Table 1.4
Table 1.5
Table 1.6
Chapter 2
Table 2.1
Chapter 3
Table 3.1
Table 3.2
Table 3.3
Table 3.4
Table 3.5
Chapter 4
Table 4.1
Table 4.2
Table 4.3
Table 4.4
Table 4.5
Table 4.6
Chapter 6
Table 6.1
Chapter 7
Table 7.1
Table 7.2
Table 7.3
Table 7.4
Table 7.5
Table 7.6
Table 7.7
Table 7.8
Table 7.9
Chapter 8
Table 8.1
Table 8.2
Table 8.3
Table 8.4
Chapter 9
Table 9.1
Table 9.2
Table 9.3
Table 9.4
Table 9.5
Table 9.6
Table 9.7
Table 9.8
Table 9.9
Table 9.10
Table 9.11
Table 9.12
Table 9.13
Table 9.14
Chapter 10
Table 10.1
Table 10.2
Table 10.3
Table 10.4
Table 10.5
Table 10.6
Table 10.7
Table 10.8
Table 10.9
Table 10.10
Table 10.11
Chapter 11
Table 11.1
Table 11.2
Table 11.3
Table 11.4
Table 11.5
Table 11.6
Chapter 12
Table 12.1
Table 12.2
Chapter 13
Table 13.1
Table 13.2
Chapter 14
Table 14.1
Table 14.2
Table 14.3
Table 14.4
Table 14.5
Table 14.6
Chapter 15
Table 15.1
Table 15.2
Table 15.3
Table 15.4
Table 15.5
Table 15.6
Table 15.7
Table 15.8
Chapter 16
Table 16.1
Table 16.2
Table 16.3
Table 16.4
Table 16.5
Table 16.6
Table 16.7
Table 16.8
Cover
Table of Contents
Preface
xi
xii
xiii
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
61
62
63
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
96
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
155
156
157
158
159
160
161
162
163
165
166
167
168
169
170
171
172
173
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
191
192
193
195
196
197
198
This book is aimed at all those who wish to discover how to analyze categorical data without getting immersed in complicated mathematics and without needing to wade through a large amount of prose. It is aimed at researchers with their own data ready to be analyzed and at students who would like an approachable alternative view of the subject. The few starred sections provide background details for interested readers, but can be omitted by readers who are more concerned with the “How” than the “Why.”
As the title suggests, each new topic is illustrated with an example. Since the examples were as new to the writer as they will be to the reader, in many cases I have suggested preliminary visualizations of the data or informal analyses prior to the formal analysis. Any model provides, at best, a convenient simplification of a mass of data into a few summary figures. For a proper analysis of any set of data, it is essential to understand the background to the data and to have available information on all the relevant variables. Examples in textbooks cannot be expected to provide detailed insights into the data analyzed: those insights should be provided by the users of the book in the context of their own sets of data.
In many cases (particularly in the later chapters), R code is given and excerpts from the resulting output are presented. R was chosen simply because it is free! The thrust of the book is about the methods of analysis, rather than any particular programming language. Users of other languages (SAS, STATA, ...) would obtain equivalent output from their analyses; it would simply be presented in a slightly different format. The author does not claim to be an expert R programmer, so the example code can doubtless be improved. However, it should work adequately as it stands.
In the context of log-linear models for cross-tabulations, two “specialties of the house” have been included: the use of cobweb diagrams to get visual information concerning significant interactions, and a procedure for detecting outlier category combinations. The R code used for these is available and may be freely adapted.
GRAHAM J. G. UPTON
Wivenhoe, EssexMarch, 2016
A first thanks go to generations of students who have sat through lectures related to this material without complaining too loudly!
I have gleaned data from a variety of sources and particular thanks are due to Mieke van Hemelrijck and Sabine Rohrmann for making the NHANES III data available. The data on the hands of blues guitarists have been taken from the Journal of Statistical Education, which has an excellent online data resource. Most European and British data were abstracted from the UK Data Archive, which is situated at the University of Essex; I am grateful for their assistance and their permission to use the data. Those interested in election data should find the website of the British Election Study helpful. The US crime data were obtained from the website provided by the FBI. On behalf of researchers everywhere, I would like to thank these entities for making their data so easy to re-analyze.
GRAHAM J. G. UPTON