faraway
Table of contents and R scripts
Click the heading to get individual scripts or
download a zip file of all the scripts
Introduction
Before You Start
Initial Data Analysis
When to Use Linear Modeling
History
Estimation
Linear Model
Matrix Representation
Estimating β
Least Squares Estimation
Examples of Calculating β
Example
QR Decomposition
Gauss–Markov Theorem
Goodness of Fit
Identifiability
Orthogonality
Inference
Hypothesis Tests to Compare Models
Testing Examples
Permutation Tests
Sampling
Confidence Intervals for β
Bootstrap Confidence Intervals
Prediction
Confidence Intervals for Predictions
Predicting Body Fat
Autoregression
What Can Go Wrong with Predictions?
Explanation
Simple Meaning
Causality
Designed Experiments
Observational Data
Matching
Covariate Adjustment
Qualitative Support for Causation
Diagnostics
Checking Error Assumptions
Constant Variance
Normality
Correlated Errors - Finding Unusual Observations
Leverage
Outliers
Influential Observations - Checking the Structure of the Model - Discussion
Problems with the Predictors
Errors in the Predictors
Changes of Scale
Collinearity
Problems with the Error
Generalized Least Squares
Weighted Least Squares
Testing for Lack of Fit
Robust Regression
M-Estimation
Least Trimmed Squares
Transformation
Transforming the Response
Transforming the Predictors
Broken Stick Regression
Polynomials
Splines
Additive Models
More Complex Models
Model Selection
Hierarchical Models
Testing-Based Procedures
Criterion-Based Procedures
Summary
Shrinkage Methods
Principal Components
Partial Least Squares
Ridge Regression
Lasso
Insurance Redlining — A Complete Example
Ecological Correlation
Initial Data Analysis
Full Model and Diagnostics
Sensitivity Analysis
Discussion
Missing Data
Types of Missing Data
Deletion
Single Imputation
Multiple Imputation
Categorical Predictors
A Two-Level Factor
Factors and Quantitative Predictors
Interpretation with Interaction Terms
Factors With More Than Two Levels
Alternative Codings of Qualitative Predictors
One Factor Models
The Model
An Example
Diagnostics
Pairwise Comparisons
False Discovery Rate
Models with Several Factors
Two Factors with No Replication
Two Factors with Replication
Two Factors with an Interaction
Larger Factorial Experiments
Experiments with Blocks
Randomized Block Design
Latin Squares
Balanced Incomplete Block Design