Contents

About the Author

In Memoriam

About the Technical Reviewer

Acknowledgments

Introduction

image Chapter 1: Getting Started

1.1 What is R, Anyway?

1.2 A First R Session

1.3 Your Second R Session

1.3.1 Working with Indexes

1.3.2 Representing Missing Data in R

1.3.3 Vectors and Vectorization in R

1.3.4 A Brief Introduction to Matrices

1.3.5 More on Lists

1.3.6 A Quick Introduction to Data Frames

image Chapter 2: Dealing with Dates, Strings, and Data Frames

2.1 Working with Dates and Times

2.2 Working with Strings

2.3 Working with Data Frames in the Real World

2.3.1 Finding and Subsetting Data

2.4 Manipulating Data Structures

2.5 The Hard Work of Working with Larger Datasets

image Chapter 3: Input and Output

3.1 R Input

3.1.1 The R Editor

3.1.2 The R Data Editor

3.1.3 Other Ways to Get Data Into R

3.1.4 Reading Data from a File

3.1.5 Getting Data from the Web

3.2 R Output

3.2.1 Saving Output to a File

image Chapter 4: Control Structures

4.1 Using Logic

4.2 Flow Control

4.2.1 Explicit Looping

4.2.2 Implicit Looping

4.3 If, If-Else, and ifelse() Statements

image Chapter 5: Functional Programming

5.1 Scoping Rules

5.2 Reserved Names and Syntactically Correct Names

5.3 Functions and Arguments

5.4 Some Example Functions

5.4.1 Guess the Number

5.4.2 A Function with Arguments

5.5 Classes and Methods

5.5.1 S3 Class and Method Example

5.5.2 S3 Methods for Existing Classes

image Chapter 6: Probability Distributions

6.1 Discrete Probability Distributions

6.2 The Binomial Distribution

6.2.1 The Poisson Distribution

6.2.2 Some Other Discrete Distributions

6.3 Continuous Probability Distributions

6.3.1 The Normal Distribution

6.3.2 The t Distribution

6.3.3 The t distribution

6.3.4 The Chi-Square Distribution

References

image Chapter 7: Working with Tables

7.1 Working with One-Way Tables

7.2 Working with Two-Way Tables

image Chapter 8: Descriptive Statistics and Exploratory Data Analysis

8.1 Central Tendency

8.1.1 The Mean

8.1.2 The Median

8.1.3 The Mode

8.2 Variability

8.2.1 The Range

8.2.2 The Variance and Standard Deviation

8.3 Boxplots and Stem-and-Leaf Displays

8.4 Using the fBasics Package for Summary Statistics

References

image Chapter 9: Working with Graphics

9.1 Creating Effective Graphics

9.2 Graphing Nominal and Ordinal Data

9.3 Graphing Scale Data

9.3.1 Boxplots Revisited

9.3.2 Histograms and Dotplots

9.3.3 Frequency Polygons and Smoothed Density Plots

9.3.4 Graphing Bivariate Data

References

image Chapter 10: Traditional Statistical Methods

10.1 Estimation and Confidence Intervals

10.1.1 Confidence Intervals for Means

10.1.2 Confidence Intervals for Proportions

10.1.3 Confidence Intervals for the Variance

10.2 Hypothesis Tests with One Sample

10.3 Hypothesis Tests with Two Samples

References

image Chapter 11: Modern Statistical Methods

11.1 The Need for Modern Statistical Methods

11.2 A Modern Alternative to the Traditional t Test

11.3 Bootstrapping

11.4 Permutation Tests

References

image Chapter 12: Analysis of Variance

12.1 Some Brief Background

12.2 One-Way ANOVA

12.3 Two-Way ANOVA

12.3.1 Repeated-Measures ANOVA

> results <- aov ( fitness ~ time + Error (id / time ), data = repeated)

12.3.2 Mixed-Model ANOVA

References

image Chapter 13: Correlation and Regression

13.1 Covariance and Correlation

13.2 Linear Regression: Bivariate Case

13.3 An Extended Regression Example: Stock Screener

13.3.1 Quadratic Model: Stock Screener

13.3.2 A Note on Time Series

13.4 Confidence and Prediction Intervals

References

image Chapter 14: Multiple Regression

14.1 The Conceptual Statistics of Multiple Regression

14.2 GSS Multiple Regression Example

14.2.1 Exploratory Data Analysis

14.2.2 Linear Model (the First)

14.2.3 Adding the Next Predictor

14.2.4 Adding More Predictors

14.2.5 Presenting Results

14.3 Final Thoughts

References

image Chapter 15: Logistic Regression

15.1 The Mathematics of Logistic Regression

15.2 Generalized Linear Models

15.3 An Example of Logistic Regression

15.3.1 What If We Tried a Linear Model on Age?

15.3.2 Seeing If Age Might Be Relevant with Chi Square

15.3.3 Fitting a Logistic Regression Model

15.3.4 The Mathematics of Linear Scaling of Data

15.3.5 Logit Model with Rescaled Predictor

15.3.6 Multivariate Logistic Regression

15.4 Ordered Logistic Regression

15.4.1 Parallel Ordered Logistic Regression

15.4.2 Non-Parallel Ordered Logistic Regression

15.5 Multinomial Regression

References

image Chapter 16: Modern Statistical Methods II

16.1 Philosophy of Parameters

16.2 Nonparametric Tests

16.2.1 Wilcoxon-Signed-Rank Test

16.2.2 Spearman’s Rho

16.2.3 Kruskal-Wallis Test

16.2.4 One-Way Test

16.3 Bootstrapping

16.3.1 Examples from mtcars

16.3.2 Bootstrapping Confidence Intervals

16.3.3 Examples from GSS

16.4 Final Thought

References

image Chapter 17: Data Visualization Cookbook

17.1 Required Packages

17.2 Univariate Plots

17.3 Customizing and Polishing Plots

17.4 Multivariate Plots

17.5 Multiple Plots

17.6 Three-Dimensional Graphs

References

image Chapter 18: High-Performance Computing

18.1 Data

18.2 Parallel Processing

18.2.1 Other Parallel Processing Approaches

References

image Chapter 19: Text Mining

19.1 Installing Needed Packages and Software

19.1.1 Java

19.1.2 PDF Software

19.1.3 R Packages

19.1.4 Some Needed Files

19.2 Text Mining

19.2.1 Word Clouds and Transformations

19.2.2 PDF Text Input

19.2.3 Google News Input

19.2.4 Topic Models

19.3 Final Thoughts

References

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.38