Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: Getting R and Getting Started
Getting and Using R
A First R Session
Moving Around in R
Working with Data in R
Vectors
Matrices
Lists
Data Frames
Dealing With Missing Data in R
Conclusion
Chapter 2: Programming in R
What is Programming?
Getting Ready to Program
The Requirements for Learning to Program
Flow Control
Looping
Conditional Statements and Branching
Essentials of R Programming
R Operators
Input and Output in R
Understanding the R Environment
Implementation of Program Flow in R
For Loops
While and Repeat Loops
Avoiding Explicit Loops: The Apply Function Family
A First R Program
Another Example—Finding Pythagorean Triples
Using R to Solve Quadratic Equations
Why R is Object-Oriented
The S3 and S4 Classes
Generic Functions
Conclusion
Chapter 3: Writing Reusable Functions
Examining an R Function from the Base R Code
Creating a Function
Calculating a Confidence Interval for a Mean
Avoiding Loops with Vectorized Operations
Vectorizing If-Else Statements Using ifelse()
Making More Powerful Functions
Any, All, and Which
Making Functions More Useful
Confidence Intervals Revisited
Conclusion
Chapter 4: Summary Statistics
Measuring Central Tendency
The Mean
The Median and Other Quantiles
The Mode
Measuring Location via Standard Scores
Measuring Variability
Variance and Standard Deviation
Range
Median and Mean Absolute Deviation
The Interquartile Range
The Coefficient of Variation
Covariance and Correlation
Measuring Symmetry (or Lack Thereof)
Conclusion
Chapter 5: Creating Tables and Graphs
Frequency Distributions and Tables
Pie Charts and Bar Charts
Pie Charts
Bar Charts
Boxplots
Histograms
Line Graphs
Scatterplots
Saving and Using Graphics
Conclusion
Chapter 6: Discrete Probability Distributions
Discrete Probability Distributions
Bernoulli Processes
The Binomial Distribution: The Number of Successes as a Random Variable
The Poisson Distribution
Relating Discrete Probability to Normal Probability
Conclusion
Chapter 7: Computing Normal Probabilities
Characteristics of the Normal Distribution
Finding Normal Densities Using the dnorm Function
Converting a Normal Distribution to the Standard Normal Distribution
Finding Probabilities Using the pnorm Function
Finding Critical Values Using the qnorm Function
Using rnorm to Generate Random Samples
The Sampling Distribution of Means
A One-sample z Test
Conclusion
Chapter 8: Creating Confidence Intervals
Confidence Intervals for Means
Confidence Intervals for the Mean Using the Normal Distribution
Confidence Intervals for the Mean Using the t Distribution
Confidence Intervals for Proportions
Understanding the Chi-square Distribution
Confidence Intervals for Variances and Standard Deviations
Confidence Intervals for Differences between Means
Confidence Intervals Using the stats Package
Conclusion
Chapter 9: Performing t Tests
A Brief Introduction to Hypothesis Testing
Understanding the t Distribution
The One-sample t Test
The Paired-samples t Test
Two-sample t Tests
The Welch t Test
The t Test Assuming Equality of Variance
A Note on Effect Size for the t Test
Conclusion
Chapter 10: One-Way Analysis of Variance
Understanding the F Distribution
Using the F Distribution to Test Variances
Compounding Alpha and Post Hoc Comparisons
One-Way ANOVA
The Variance Partition in the One-Way ANOVA
An Example of the One-Way ANOVA
Tukey HSD Test
Bonferroni-Corrected Post Hoc Comparisons
Using the anova Function
Conclusion
Chapter 11: Advanced Analysis of Variance
Two-Way ANOVA
Sums of Squares in Two-Way ANOVA
An Example of a Two-Way ANOVA
Examining Interactions
Plotting a Significant Interaction
Effect Size in the Two-Way ANOVA
Repeated-Measures ANOVA
The Variance Partition in Repeated-Measures ANOVA
Example of a Repeated-Measures ANOVA
Effect Size for Repeated-Measures ANOVA
Mixed-Factorial ANOVA
Example of a Mixed-Factorial ANOVA
Conclusion
Chapter 12: Correlation and Regression
Covariance and Correlation
Regression
An Example: Predicting the Price of Gasoline
Examining the Linear Relationship
Fitting a Quadratic Model
Determining Confidence and Prediction Intervals
Conclusion
Chapter 13: Multiple Regression
The Multiple Regression Equation
Multiple Regression Example: Predicting Job Satisfaction
Using Matrix Algebra to Solve a Regression Equation
Brief Introduction to the General Linear Model
The t Test as a Special Case of Correlation
The t Test as a Special Case of ANOVA
ANOVA as a Special Case of Multiple Regression
More on Multiple Regression
Entering Variables into the Regression Equation
Dealing with Collinearity
Conclusion
Chapter 14: Logistic Regression
What Is Logistic Regression?
Logistic Regression with One Dichotomous Predictor
Logistic Regression with One Continuous Predictor
Logistic Regression with Multiple Predictors
Comparing Logistic and Multiple Regression
Alternatives to Logistic Regression
Conclusion
Chapter 15: Chi-Square Tests
Chi-Square Tests of Goodness of Fit
Goodness-of-Fit Tests with Equal Expected Frequencies
Goodness-of-Fit Tests with Unequal Expected Frequencies
Chi-Square Tests of Independence
A Special Case: Two-by-Two Contingency Tables
Relating the Standard Normal Distribution to Chi-Square
Effect Size for Chi-Square Tests
Demonstrating the Relationship of Phi to the Correlation Coefficient
Conclusion
Chapter 16: Nonparametric Tests
Nonparametric Alternatives to t Tests
The Mann-Whitney U Test
The Wilcoxon Signed-Ranks Test
Nonparametric Alternatives to ANOVA
The Kruskal-Wallis Test
The Friedman Test for Repeated Measures or Randomized Blocks
Nonparametric Alternatives to Correlation
Spearman Rank Correlation
The Kendall Tau Coefficient
Conclusion
Chapter 17: Using R for Simulation
Defining Statistical Simulation
Random Numbers
Sampling and Resampling
Revisiting Mathematical Operations in R
Some Simulations in R
A Confidence Interval Simulation
A t Test Simulation
A Uniform Distribution Simulation
A Binomial Distribution Simulation
Conclusion
Chapter 18: The “New” Statistics: Resampling and Bootstrapping
The Pitfalls of Hypothesis Testing
The Bootstrap
Bootstrapping the Mean
Bootstrapping the Median
Jackknifing
Permutation Tests
More on Modern Robust Statistical Methods
Conclusion
Chapter 19: Making an R Package
The Concept of a Package
Some Windows Considerations
Establishing the Skeleton of an R Package
Editing the R Documentation
Building and Checking the Package
Installing the Package
Making Sure the Package Works Correctly
Maintaining Your R Package
Adding a New Function
Building the Package Again
Conclusion
Chapter 20: The R Commander Package
The R Commander Interface
Examples of Using R Commander for Data Analysis
Confidence Intervals in R Commander
Using R Commander for Hypothesis Testing
Using R Commander for Regression
Conclusion
Index
← Prev
Back
Next →
← Prev
Back
Next →