faraway

Table of contents and R scripts for 3rd Edition of Linear Models with R

Click the heading to get individual scripts or download a zip file of all the scripts

  1. Introduction
    • Before You Start
    • Initial Data Analysis
    • When to Use Linear Modeling
    • History
  2. Estimation
    • Linear Model
    • Matrix Representation
    • Estimating β
    • Least Squares Estimation
    • Examples of Calculating β
    • Example
    • Intercept
    • QR Decomposition
    • Gauss–Markov Theorem
    • Goodness of Fit
    • Identifiability
    • Orthogonality
  3. Inference
    • Hypothesis Tests to Compare Models
    • Testing Examples
    • Confidence Intervals for β
    • Problems with inference
  4. Sampling
    • Simulation
    • Sampling Models
    • Permutation Tests
    • Bootstrap Confidence Intervals
  5. Prediction
    • Confidence and Prediction Intervals for Predictions
    • Predicting Body Fat
    • Prediction Model Assessment
    • Autoregression
    • What Can Go Wrong with Predictions?
  6. Explanation
    • Explanation by Prediction
    • Confounding and Simpson’s Paradox
    • Counterfactuals
    • Insulation Example
    • Designed Experiments
    • New Hampshire Primary Example
    • Qualitative Support for Causation
    • Summary
  7. Diagnostics
    • Checking Error Assumptions
    • Finding Unusual Observations
    • Checking the Systematic Structure of the Model
    • Discussion
  8. Problems with the Predictors
    • Errors in the Predictors
    • Changes of Scale
    • Collinearity
  9. Problems with the Error
    • Generalized Least Squares
    • Weighted Least Squares
    • Testing for Lack of Fit
    • Robust Regression
  10. Transformation
    • Choosing a Transform on the Response
    • Algorithms for Transforming the Response
    • Transforming the Predictors
    • Segmented Regression
    • Polynomials
    • Splines
    • Additive Models
  11. Model Selection
    • Models with a Hierarchy
    • Testing-Based Procedures
    • Criterion-Based Procedures
    • Crossvalidation
    • Summary
  12. Regularization
    • Principal Components
    • Partial Least Squares
    • Ridge Regression
    • Lasso
    • Elastic Net
  13. Insurance Redlining — A Complete Example
    • Ecological Correlation
    • Initial Data Analysis
    • Full Model and Diagnostics
    • Sensitivity Analysis
    • Discussion
  14. Missing Data
    • Types of Missing Data
    • Deletion
    • Single Imputation
    • Multiple Imputation
  15. Categorical Predictors
    • A Two-Level Factor
    • Factors and Quantitative Predictors
    • More Lessons from the Hips Study
    • Interpretation with Interaction Terms
    • Factors With More Than Two Levels
    • Contrasts and Factor Codings
  16. One Factor Models
    • The Model
    • An Example
    • Analysis of Variance
    • Other Factor Codings
    • Diagnostics
    • Pairwise Comparisons
    • False Discovery Rate
    • Design Considerations
  17. Models with Several Factors
    • Two Factors with No Replication
    • Estimated Marginal Means and Multiple Comparisons
    • Ordinal Factors
    • Two Factors with Replication
    • Two Factors with an Interaction
    • Design for Two Factor Experiments
    • Larger Factorial Experiments
  18. Experiments with Blocks
    • Randomized Block Design
    • Latin Squares
    • Balanced Incomplete Block Design