Atnaujinkite slapukų nuostatas

El. knyga: R Companion to Applied Regression

4.04/5 (49 ratings by Goodreads)
(McMaster University, Canada), (University of Minnesota, USA)
  • Formatas: PDF+DRM
  • Išleidimo metai: 27-Sep-2018
  • Leidėjas: SAGE Publications Inc
  • Kalba: eng
  • ISBN-13: 9781544336480
  • Formatas: PDF+DRM
  • Išleidimo metai: 27-Sep-2018
  • Leidėjas: SAGE Publications Inc
  • Kalba: eng
  • ISBN-13: 9781544336480

DRM apribojimai

  • Kopijuoti:

    neleidžiama

  • Spausdinti:

    neleidžiama

  • El. knygos naudojimas:

    Skaitmeninių teisių valdymas (DRM)
    Leidykla pateikė šią knygą šifruota forma, o tai reiškia, kad norint ją atrakinti ir perskaityti reikia įdiegti nemokamą programinę įrangą. Norint skaityti šią el. knygą, turite susikurti Adobe ID . Daugiau informacijos  čia. El. knygą galima atsisiųsti į 6 įrenginius (vienas vartotojas su tuo pačiu Adobe ID).

    Reikalinga programinė įranga
    Norint skaityti šią el. knygą mobiliajame įrenginyje (telefone ar planšetiniame kompiuteryje), turite įdiegti šią nemokamą programėlę: PocketBook Reader (iOS / Android)

    Norint skaityti šią el. knygą asmeniniame arba „Mac“ kompiuteryje, Jums reikalinga  Adobe Digital Editions “ (tai nemokama programa, specialiai sukurta el. knygoms. Tai nėra tas pats, kas „Adobe Reader“, kurią tikriausiai jau turite savo kompiuteryje.)

    Negalite skaityti šios el. knygos naudodami „Amazon Kindle“.

An R Companion to Applied Regression is a broad introduction to the R statistical computing environment in the context of applied regression analysis. John Fox and Sanford Weisberg provide a step-by-step guide to using the free statistical software R, an emphasis on integrating statistical computing in R with the practice of data analysis, coverage of generalized linear models, and substantial web-based support materials. The Third Edition has been reorganized and includes a new chapter on mixed-effects models, new and updated data sets, and a de-emphasis on statistical programming, while retaining a general introduction to basic R programming. The authors have substantially updated both the car and effects packages for R for this edition, introducing additional capabilities and making the software more consistent and easier to use. They also advocate an everyday data-analysis workflow that encourages reproducible research. To this end, they provide coverage of RStudio, an interactive development environment for R that allows readers to organize and document their work in a simple and intuitive fashion, and then easily share their results with others. Also included is coverage of R Markdown, showing how to create documents that mix R commands with explanatory text. 

"An R Companion to Applied Regression continues to provide the most comprehensive and user-friendly guide to estimating, interpreting, and presenting results from regression models in R."

Christopher Hare, University of California, Davis

Recenzijos

"An R Companion to Applied Regression continues to provide the most comprehensive and user-friendly guide to estimating, interpreting, and presenting results from regression models in R." -- Christopher Hare "This is the best book Ive read for teaching the modern practice of regression. By going deeply into both R and applied regression, it manages to use each topic to motivate and illustrate the other. The whole is much greater than sum of the parts because each thread so effectively reinforces the other. There are many nice surprises in this new edition.  R Studio and markdown are used to encourage a reproducible workflow. Theres an excellent and accessible chapter on mixed and longitudinal data that expands the reach of regression methods to the much more complex data structures typical of current practice. Like its predecessors, this edition is a model of clear, thoughtful exposition. Its an outstanding contribution to the teaching and practice of regression." -- Georges Monette "This is an impressive update to a book I have long admired. The authors have brought the description of how to do data analysis and plots of Applied Regression related data to a modern and more comprehensive level." -- Michael Friendly

Preface xiii
What Is R?
xiv
Obtaining and Installing R and RStudio
xvi
Installing R on a Windows System
xvii
Installing R on a macOS System
xvii
Installing RStudio
xviii
Installing and Using R Packages
xx
Optional: Customizing R
xxii
Optional: Installing LATEX
xxiii
Using This Book
xxiii
Chapter Synopses
xxiv
Typographical Conventions
xxv
New in the Third Edition
xxvi
The Website for the R Companion
xxvii
Beyond the R Companion
xxviii
Acknowledgments
xxviii
About the Authors xxx
1 Getting Started With R and RStudio 1(52)
1.1 Projects in RStudio
2(3)
1.2 R Basics
5(16)
1.2.1 Interacting With R Through the Console
5(2)
1.2.2 Editing R Commands in the Console
7(1)
1.2.3 R Functions
7(4)
1.2.4 Vectors and Variables
11(3)
1.2.5 Nonnumeric Vectors
14(2)
1.2.6 Indexing Vectors
16(2)
1.2.7 User-Defined Functions
18(3)
1.3 Fixing Errors and Getting Help
21(4)
1.3.1 When Things Go Wrong
21(2)
1.3.2 Getting Help and Information
23(2)
1.4 Organizing Your Work in R and RStudio and Making It Reproducible
25(8)
1.4.1 Using the RStudio Editor With R Script Files
25(3)
1.4.2 Writing R Markdown Documents
28(5)
1.5 An Extended Illustration: Duncan's Occupational-Prestige Regression
33(14)
1.5.1 Examining the Data
36(3)
1.5.2 Regression Analysis
39(1)
1.5.3 Regression Diagnostics
40(7)
1.6 R Functions for Basic Statistics
47(1)
1.7 Generic Functions and Their Methods*
47(6)
2 Reading and Manipulating Data 53(70)
2.1 Data Input
54(13)
2.1.1 Accessing Data From a Package
54(2)
2.1.2 Entering a Data Frame Directly
56(3)
2.1.3 Reading Data From Plain-Text Files
59(4)
2.1.4 Files and Paths
63(2)
2.1.5 Exporting or Saving a Data Frame to a File
65(1)
2.1.6 Reading and Writing Other File Formats
66(1)
2.2 Other Approaches to Reading and Managing Data Sets in R
67(2)
2.3 Working With Data Frames
69(26)
2.3.1 How the R Interpreter Finds Objects
69(3)
2.3.2 Missing Data
72(7)
2.3.3 Modifying and Transforming Data
79(7)
2.3.4 Binding Rows and Columns
86(1)
2.3.5 Aggregating Data Frames
87(2)
2.3.6 Merging Data Frames
89(2)
2.3.7 Reshaping Data
91(4)
2.4 Working With Matrices, Arrays, and Lists
95(12)
2.4.1 Matrices
96(1)
2.4.2 Arrays
97(1)
2.4.3 Lists
98(1)
2.4.4 Indexing
99(8)
2.5 Dates and Times
107(3)
2.6 Character Data
110(7)
2.7 Large Data Sets in R*
117(5)
2.7.1 How Large Is "Large"?
118(2)
2.7.2 Reading and Saving Large Data Sets
120(2)
2.8 Complementary Reading and References
122(1)
3 Exploring and Transforming Data 123(50)
3.1 Examining Distributions
124(10)
3.1.1 Histograms
124(4)
3.1.2 Density Estimation
128(2)
3.1.3 Quantile-Comparison Plots
130(3)
3.1.4 Boxplots
133(1)
3.2 Examining Relationships
134(11)
3.2.1 Scatterplots
134(7)
3.2.2 Parallel Boxplots
141(3)
3.2.3 More on the plot () Function
144(1)
3.3 Examining Multivariate Data
145(3)
3.3.1 Three-Dimensional Plots
145(1)
3.3.2 Scatterplot Matrices
146(2)
3.4 Transforming Data
148(21)
3.4.1 Logarithms: The Champion of Transformations
148(6)
3.4.2 Power Transformations
154(8)
3.4.3 Transformations and Exploratory Data Analysis
162(5)
3.4.4 Transforming Restricted-Range Variables
167(1)
3.4.5 Other Transformations
168(1)
3.5 Point Labeling and Identification
169(2)
3.5.1 The identify () Function
169(1)
3.5.2 Automatic Point Labeling
170(1)
3.6 Scatterplot Smoothing
171(1)
3.7 Complementary Reading and References
172(1)
4 Fitting Linear Models 173(70)
4.1 The Linear Model
174(2)
4.2 Linear Least-Squares Regression
176(11)
4.2.1 Simple Linear Regression
176(7)
4.2.2 Multiple Linear Regression
183(2)
4.2.3 Standardized Regression Coefficients
185(2)
4.3 Predictor Effect Plots
187(3)
4.4 Polynomial Regression and Regression Splines
190(7)
4.4.1 Polynomial Regression
190(4)
4.4.2 Regression Splines*
194(3)
4.5 Factors in Linear Models
197(10)
4.5.1 A Linear Model With One Factor: One-Way Analysis of Variance
201(4)
4.5.2 Additive Models With Numeric Predictors and Factors
205(2)
4.6 Linear Models With Interactions
207(17)
4.6.1 Interactions Between Numeric Predictors and Factors
207(6)
4.6.2 Shortcuts for Writing Linear-Model Formulas
213(1)
4.6.3 Multiple Factors
214(8)
4.6.4 Interactions Between Numeric Predictors*
222(2)
4.7 More on Factors
224(8)
4.7.1 Dummy Coding
224(1)
4.7.2 Other Factor Codings
224(3)
4.7.3 Ordered Factors and Orthogonal-Polynomial Contrasts
227(3)
4.7.4 User-Specified Contrasts*
230(1)
4.7.5 Suppressing the Intercept in a Model With Factors*
231(1)
4.8 Too Many Regressors*
232(3)
4.9 The Arguments of the lm () Function
235(6)
4.9.1 formula
235(3)
4.9.2 data
238(1)
4.9.3 subset
238(1)
4.9.4 weights
239(1)
4.9.5 na.action
239(1)
4.9.6 method, model, x, y, qr*
240(1)
4.9.7 singular.ok*
240(1)
4.9.8 contrasts
240(1)
4.9.9 offset
240(1)
4.10 Complementary Reading and References
241(2)
5 Coefficient Standard Errors, Confidence Intervals, and Hypothesis Tests 243(28)
5.1 Coefficient Standard Errors
244(10)
5.1.1 Conventional Standard Errors of Least-Squares Regression Coefficients
244(2)
5.1.2 Robust Regression Coefficient Standard Errors
246(2)
5.1.3 Using the Bootstrap to Compute Standard Errors
248(4)
5.1.4 The Delta Method for Standard Errors of Nonlinear Functions*
252(2)
5.2 Confidence Intervals
254(4)
5.2.1 Wald Confidence Intervals
254(1)
5.2.2 Bootstrap Confidence Intervals
255(1)
5.2.3 Confidence Regions and Data Ellipses*
256(2)
5.3 Testing Hypotheses About Regression Coefficients
258(12)
5.3.1 Wald Tests
258(1)
5.3.2 Likelihood-Ratio Tests and the Analysis of Variance
259(1)
5.3.3 Sequential Analysis of Variance
260(2)
5.3.4 The Anova () Function
262(5)
5.3.5 Testing General Linear Hypotheses*
267(3)
5.4 Complementary Reading and References
270(1)
6 Fitting Generalized Linear Models 271(64)
6.1 Review of the Structure of GLMs
272(4)
6.2 The glm () Function in R
276(1)
6.3 GLMs for Binary Response Data
276(13)
6.3.1 Example: Women's Labor Force Participation
278(4)
6.3.2 Example: Volunteering for a Psychological Experiment
282(1)
6.3.3 Predictor Effect Plots for Logistic Regression
283(2)
6.3.4 Analysis of Deviance and Hypothesis Tests for Logistic Regression
285(4)
6.3.5 Fitted and Predicted Values
289(1)
6.4 Binomial Data
289(7)
6.5 Poisson GLMs for Count Data
296(5)
6.6 Loglinear Models for Contingency Tables
301(8)
6.6.1 Two-Dimensional Tables
301(3)
6.6.2 Three-Dimensional Tables
304(2)
6.6.3 Sampling Plans for Loglinear Models
306(1)
6.6.4 Response Variables
307(2)
6.7 Multinomial Response Data
309(5)
6.8 Nested Dichotomies
314(3)
6.9 The Proportional-Odds Model
317(5)
6.9.1 Testing for Proportional Odds
319(3)
6.10 Extensions
322(8)
6.10.1 More on the Anova () Function
322(1)
6.10.2 Gamma Models
323(2)
6.10.3 Quasi-Likelihood Estimation
325(1)
6,10.4 Overdispersed Binomial and Poisson Models
326(4)
6.11 Arguments to glm()
330(2)
6.11.1 weights
331(1)
6.11.2 start, etastart, mustart
331(1)
6.11.3 offset
331(1)
6.11.4 control
332(1)
6.11.5 model, method, x, y
332(1)
6.12 Fitting GLMs by Iterated Weighted Least Squares*
332(1)
6.13 Complementary Reading and References
333(2)
7 Fitting Mixed-Effects Models 335(50)
7.1 Background: The Linear Model Revisited
336(1)
7.1.1 The Linear Model in Matrix Form*
336(1)
7.2 Linear Mixed-Effects Models
336(39)
7.2.1 Matrix Form of the Linear Mixed-Effects Model*
338(1)
7.2.2 An Application to Hierarchical Data
339(18)
7.2.3 Wald Tests for Linear Mixed-Effects Models
357(1)
7.2.4 Examining the Random Effects: Computing BLUPs
358(2)
7.2.5 An Application to Longitudinal Data
360(11)
7.2.6 Modeling the Errors
371(2)
7.2.7 Sandwich Standard Errors for Least-Squares Estimates
373(2)
7.3 Generalized Linear Mixed Models
375(7)
7.3.1 Matrix Form of the GLMM*
376(1)
7.3.2 Example: Minneapolis Police Stops
377(5)
7.4 Complementary Reading
382(3)
8 Regression Diagnostics for Linear, Generalized Linear, and Mixed-Effects Models 385(52)
8.1 Residuals
386(2)
8.2 Basic Diagnostic Plots
388(8)
8.2.1 Plotting Residuals
388(3)
8.2.2 Marginal-Model Plots
391(1)
8.2.3 Added-Variable Plots
392(3)
8.2.4 Marginal-Conditional Plots
395(1)
8.3 Unusual Data
396(9)
8.3.1 Outliers and Studentized Residuals
397(1)
8.3.2 Leverage: Hat-Values
398(1)
8.3.3 Influence Measures
399(6)
8.4 Transformations After Fitting a Regression Model
405(9)
8.4.1 Transforming the Response
406(4)
8.4.2 Predictor Transformations
410(4)
8.5 Nonconstant Error Variance
414(3)
8.5.1 Testing for Nonconstant Error Variance
416(1)
8.6 Diagnostics for Generalized Linear Models
417(8)
8.6.1 Residuals and Residual Plots
418(3)
8.6.2 Influence Measures
421(1)
8.6.3 Graphical Methods: Added-Variable Plots, Component-Plus-Residual Plots, and Effect Plots With Partial Residuals
422(3)
8.7 Diagnostics for Mixed-Effects Models
425(4)
8.7.1 Mixed-Model Component-Plus-Residual Plots
425(3)
8.7.2 Influence Diagnostics for Mixed Models
428(1)
8.8 Collinearity and Variance Inflation Factors
429(5)
8.9 Additional Regression Diagnostics
434(1)
8.10 Complementary Reading and References
435(2)
9 Drawing Graphs 437(40)
9.1 A General Approach to R Graphics
438(16)
9.1.1 Defining a Coordinate System: plot ()
439(2)
9.1.2 Graphics Parameters: par ()
441(1)
9.1.3 Adding Graphical Elements: axis (), points (), lines (), text (), et al.
442(10)
9.1.4 Specifying Colors
452(2)
9.2 Putting It Together: Explaining Local Linear Regression
454(13)
9.2.1 Finer Control Over Plot Layout
461(6)
9.3 Other R Graphics Packages
467(9)
9.3.1 The lattice Package
467(2)
9.3.2 The ggplot2 Package
469(3)
9.3.3 Maps
472(3)
9.3.4 Other Notable Graphics Packages
475(1)
9.4 Complementary Reading and References
476(1)
10 An Introduction to R Programming 477(62)
10.1 Why Learn to Program in R?
478(1)
10.2 Defining Functions: Preliminary Examples
479(7)
10.2.1 Lagging a Variable
479(3)
10.2.2 Creating an Influence Plot
482(4)
10.3 Working With Matrices*
486(6)
10.3.1 Basic Matrix Arithmetic
486(2)
10.3.2 Matrix Inversion and the Solution of Linear Simultaneous Equations
488(1)
10.3.3 Example: Linear Least-Squares Regression
489(2)
10.3.4 Eigenvalues and Eigenvectors
491(1)
10.3.5 Miscellaneous Matrix Computations
491(1)
10.4 Program Control With Conditionals, Loops, and Recursion
492(7)
10.4.1 Conditionals
492(3)
10.4.2 Iteration (Looping)
495(3)
10.4.3 Recursion
498(1)
10.5 Avoiding Loops: apply () and Its Relatives
499(10)
10.5.1 To Loop or Not to Loop?
505(4)
10.6 Optimization Problems*
509(6)
10.6.1 Zero-Inflated Poisson Regression
509(6)
10.7 Monte-Carlo Simulation*
515(7)
10.7.1 Testing Regression Models Using Simulation
516(6)
10.8 Debugging R Code*
522(5)
10.9 Object-Oriented Programming in R*
527(6)
10.10 Writing Statistical-Modeling Functions in R*
533(3)
10.11 Organizing Code for R Functions
536(1)
10.12 Complementary Reading and References
537(2)
References 539(12)
Subject Index 551(16)
Data Set Index 567(2)
Package Index 569(2)
Index of Functions and Operators 571
John Fox received a BA from the City College of New York and a PhD from the University of Michigan, both in Sociology. He is Professor Emeritus of Sociology at McMaster University in Hamilton, Ontario, Canada, where he was previously the Senator William McMaster Professor of Social Statistics. Prior to coming to McMaster, he was Professor of Sociology, Professor of Mathematics and Statistics, and Coordinator of the Statistical Consulting Service at York University in Toronto. Professor Fox is the author of many articles and books on applied statistics, including \emph{Applied Regression Analysis and Generalized Linear Models, Third Edition} (Sage, 2016). He is an elected member of the R Foundation, an associate editor of the Journal of Statistical Software, a prior editor of R News and its successor the R Journal, and a prior editor of the Sage Quantitative Applications in the Social Sciences monograph series.  

Sanford Weisberg is Professor Emeritus of statistics at the University of Minnesota.  He has also served as the director of the Universitys Statistical Consulting Service, and has worked with hundreds of social scientists and others on the statistical aspects of their research.  He earned a BA in statistics from the University of California, Berkeley, and a Ph.D., also in statistics, from Harvard University, under the direction of Frederick Mosteller.  The author of more than 60 articles in a variety of areas, his methodology research has primarily been in regression analysis, including graphical methods, diagnostics, and computing.  He is a fellow of the American Statistical Association and former Chair of its Statistical Computing Section.  He is the author or coauthor of several books and monographs, including the widely used textbook Applied Linear Regression, which has been in print for almost forty years.