Extending The Linear Model With R 2nd Edition by Julian James Faraway – Ebook PDF Instant Download/DeliveryISBN: 1498720986, 9781498720984
Full download Extending The Linear Model With R 2nd Edition after payment.
Product details:
ISBN-10 : 1498720986
ISBN-13 : 9781498720984
Author: Julian James Faraway
Start Analyzing a Wide Range of Problems Since the publication of the bestselling, highly recommended first edition, R has considerably expanded both in popularity and in the number of packages available. Extending the Linear Model with R: Generalized Linear, Mixed Effects and Nonparametric Regression Models, Second Edition takes advantage of the greater functionality now available in R and substantially revises and adds several topics. New to the Second Edition Expanded coverage of binary and binomial responses, including proportion responses, quasibinomial and beta regression, and applied considerations regarding these models New sections on Poisson models with dispersion, zero inflated count models, linear discriminant analysis, and sandwich and robust estimation for generalized linear models (GLMs) Revised chapters on random effects and repeated measures that reflect changes in the lme4 package and show how to perform hypothesis testing for the models using other methods New chapter on the Bayesian analysis of mixed effect models that illustrates the use of STAN and presents the approximation method of INLA Revised chapter on generalized linear mixed models to reflect the much richer choice of fitting software now available Updated coverage of splines and confidence bands in the chapter on nonparametric regression New material on random forests for regression and classification Revamped R code throughout, particularly the many plots using the ggplot2 package Revised and expanded exercises with solutions now included Demonstrates the Interplay of Theory and Practice This textbook continues to cover a range of techniques that grow from the linear regression model. It presents three extensions to the linear framework: GLMs, mixed effect models, and nonparametric regression models. The book explains data analysis using real examples and includes all the R commands necessary to reproduce the analyses.
Extending The Linear Model With R 2nd table of contents:
Chapter 1 Introduction
Figure 1.1 Histogram of the undercount is shown on the left and a density estimate with a data rug is shown on the right.
Figure 1.2 Pie chart of the voting equipment frequencies is shown on the left and a Pareto chart on the right.
Figure 1.3 A scatterplot plot of proportions of Gore voters and African Americans by county is shown on the left. Boxplots showing the distribution of the undercount by voting equipment are shown on the right.
Figure 1.4 Diagnostics obtained from plotting the model object.
Figure 1.5 Half-normal plot of the leverages is shown on the left and a partial residual plot for the proportion of African Americans is shown on the right.
Figure 1.6 Partial fits using orthogonal polynomials for cperAA (shown on the left) and cubic B-splines for cpergore (shown on the right).
Exercises
Chapter 2 Binary Response
2.1 Heart Disease Example
Figure 2.1 Plots of the presence/absence of heart disease according to height in inches.
Figure 2.2 Interleaved histograms of the distribution of heights and cigarette usage for men with and without heart disease.
Figure 2.3 Height and cigarette consumption for men without heart disease on the left and with heart disease on the right. Some jittering and transparency have been used to reduce overplotting problems.
2.2 Logistic Regression
Figure 2.4 A logistic relationship between the probability of the response, p, and the linear predictor, η.
Figure 2.5 Predicted probability of heart disease as height and cigarette consumption vary. In the first panel, the solid line represents a nonsmoker, while the dashed line is a pack-a-day smoker. In the second panel, the solid line represents a very short man (60 in. tall) while the dashed line represents a very tall man (78 in. tall.)
2.3 Inference
2.4 Diagnostics
Figure 2.6 The panel on the left shows the raw residuals and linear predictor. The two lines are due to the binary response. The panel on the right shows the binned version of the plot.
Figure 2.7 Binned residuals plots for the predictors.
Figure 2.8 A QQ plot of the deviance residuals is shown on the left and a half-normal plot of the leverages is shown on the right.
2.5 Model Selection
2.6 Goodness of Fit
Figure 2.9 Binned predicted probabilities and observed proportions for the heart disease model.
Figure 2.10 Sensitivity and specificity for the heart disease model plotted as a function of the probability threshold on the left and as the receiver operating characteristic curve on the right.
2.7 Estimation Problems
Figure 2.11 Two species of iris by sepal length and width. The line is computed from the bias-reduced GLM fit.
Exercises
Chapter 3 Binomial and Proportion Responses
3.1 Binomial Regression Model
Figure 3.1 Damage to O-rings in 23 space shuttle missions as a function of launch temperature. Logistic fit is shown.
3.2 Inference
3.3 Pearson’s χ2 Statistic
3.4 Overdispersion
Figure 3.2 Diagnostic plots for the trout egg model. A half-normal plot of the residuals is shown on the left and an interaction plot of the empirical logits is shown on the right.
3.5 Quasi-Binomial
Figure 3.3 A half-normal plot of the Cook statistics is shown on the left and a plot of the Pearson residuals against the fitted linear predictors is shown on the right.
3.6 Beta Regression
Exercises
Chapter 4 Variations on Logistic Regression
4.1 Latent Variables
Figure 4.1 Probability of getting the answer wrong for logistic latent variable.
4.2 Link Functions
Figure 4.2 Probit, logit, complementary log-log and cauchit compared. The data range from 0 to 4. We see that the links are similar in this range and only begin to diverge as we extrapolate.
Figure 4.3 Ratio of predicted probit to logit probabilities in the lower tail on the left and in the upper tail to the right.
4.3 Prospective and Retrospective Sampling
Table 4.1 Incidence of respiratory disease in infants to the age of 1 year.
4.4 Prediction and Effective Doses
4.5 Matched Case-Control Studies
Exercises
Chapter 5 Count Regression
5.1 Poisson Regression
Figure 5.1 Poisson probabilities for μ = 0.5, 2 and 5, respectively.
Figure 5.2 Residual-fitted plots for the Galápagos dataset. The plot on the left is for a model with the original response while that on the right is for the square-root transformed response.
5.2 Dispersed Poisson Model
Figure 5.3 Half-normal plot of the residuals of the Poisson model is shown on the left and the relationship between the mean and variance is shown on the right. A line representing mean equal to variance is also shown.
5.3 Rate Models
Figure 5.4 Chromosomal abnormalities rate response is shown on the left and a residuals vs. fitted plot of a linear model fit to these data is shown on the right.
5.4 Negative Binomial
5.5 Zero Inflated Count Models
Figure 5.5 On the left, the predicted and observed counts for number of articles 0–7 is shown. On the right, the predictions from the hurdle and zero-inflated Poisson model are compared.
Exercises
Chapter 6 Contingency Tables
6.1 Two-by-Two Tables
Table 6.1 Study of the relationship between wafer quality and the presence of particles on the wafer.
6.2 Larger Two-Way Tables
Figure 6.1 Dotchart and mosaic plot.
6.3 Correspondence Analysis
Figure 6.2 Correspondence analysis for hair-eye combinations. Hair colors are given in uppercase letters and eye colors are given in lowercase letters.
6.4 Matched Pairs
6.5 Three-Way Contingency Tables
6.6 Ordinal Variables
Exercises
Chapter 7 Multinomial Data
7.1 Multinomial Logit Model
Figure 7.1 Relationship between party affiliation and education, age and income. Democrats are shown with solid line, Republicans with a dashed line and Independents with a dotted line. Education is categorized into seven levels described in the text. Income is in thousands of dollars.
Figure 7.2 Predicted probabilities of party affiliation as income varies (thousands).
7.2 Linear Discriminant Analysis
7.3 Hierarchical or Nested Responses
Figure 7.3 Hierarchical response for birth types.
Figure 7.4 The first plot shows the empirical logits for the proportion of CNS births related to water hardness and profession (M=Manual, N=Nonmanual). The second is a half-normal plot of the residuals of the chosen model.
7.4 Ordinal Multinomial Responses
Figure 7.5 Latent variable view of an ordered multinomial response. Here, four discrete responses can occur, depending on the position of Z relative to the cutpoints θj. As x changes, the cutpoints will move together to change the relative probabilities of the four responses.
Figure 7.6 Solid lines represent an income of $0, dotted lines are for $50,000 and dashed lines are for $100,000. The probability of being a Democrat is given by the area lying to the left of the leftmost of each pair of lines, while the probability of being a Republican is given by the area to the right of the rightmost of the pair. Independents are represented by the area in-between.
Exercises
Chapter 8 Generalized Linear Models
8.1 GLM Definition
Table 8.1 Canonical links for GLMs.
8.2 Fitting a GLM
8.3 Hypothesis Tests
Table 8.2 For the binomial yi ~ B(m, pi) and µi = mpi, that is, μ is the count and not proportion in this formula. For the Poisson, the deviance is known as the G-statistic. The second term Σi(yi − ) is usually zero if an intercept term is used in the model.
8.4 GLM Diagnostics
Figure 8.1 Residual vs. fitted plots for the Galápagos model. The first uses fitted values in the scale of the response while the second uses fitted values in the scale of the linear predictor. The third plot uses response residuals while the first two use deviance residuals.
Figure 8.2 Plots of the number of species against area for the Galápagos data. The first plot clearly shows a need for transformation, the second shows the advantage of using logged area, while the third shows the value of using the linearized response.
Figure 8.3 A partial residual plot for log(Area) is shown on the left while a diagnostic for the link function is shown on the right.
Figure 8.4 Half-normal plots of the jackknife residuals on the left and the leverages on the right.
Figure 8.5 Half-normal plot of the Cook statistics is shown on the left and an index plot of the change in the Scruz coefficient is shown on the right.
8.5 Sandwich Estimation
8.6 Robust Estimation
Exercises
Chapter 9 Other GLMs
9.1 Gamma GLM
Figure 9.1 The gamma density explored. In the first panel ν = 0.75 and we see that the density is unbounded at zero. In the second panel, ν = 1 which is the exponential density. In the third panel, ν = 2 and we see a skewed distribution.
Figure 9.2 Gamma density for observed shape of 1/0.55597 is shown on the left and lognormal density for an observed SD on the log scale of The means have been set to one in both cases.
9.2 Inverse Gaussian GLM
Figure 9.3 Inverse Gaussian densities for λ = 0.5 on the left, λ = 1 in the middle and λ = 5 on the right. μ = 1 in all three cases.
Figure 9.4 Projected and actual sales are shown for 20 products on the left. The linear model fit is shown as a solid line and the inverse Gaussian GLM fit is shown with a dotted line. A residual-fitted plot for the inverse Gaussian GLM is shown on the right.
9.3 Joint Modeling of the Mean and Dispersion
Table 9.1 F=Flour, S=Shortening, E=Eggs, T=Oven temperature and t=Baking time. “+” indicates a higher-than-normal setting while “–” indicates a lower-than-normal setting. “0” indicates the standard setting.
9.4 Quasi-Likelihood GLM
Figure 9.5 Deviance as the power of the link function is varied on the left and the variance function on the right.
9.5 Tweedie GLM
Figure 9.6 Predictive density for the first zip code based on the fitted Tweedie GLM. Response is zero with probability 0.458 but otherwise takes a continuous positive value.
Exercises
Chapter 10 Random Effects
10.1 Estimation
Figure 10.1 Paper brightness varying by operator. Some jittering has been used to make coincident points apparent.
10.2 Inference
10.3 Estimating Random Effects
Figure 10.2 Confidence intervals for the random effects in the pulp data.
10.4 Prediction
10.5 Diagnostics
Figure 10.3 Diagnostic plots for the one-way random effects model.
10.6 Blocks as Random Effects
Figure 10.4 Yield from penicillin blends varying by treatment.
10.7 Split Plots
Figure 10.5 Yield on fields with different irrigation methods.
Figure 10.6 Diagnostic plots for the split plot example.
10.8 Nested Effects
Figure 10.7 Fat content of homogenous powdered egg as tested by different laboratories, technicians and samples.
10.9 Crossed Effects
Figure 10.8 Abrasion wear on material according to run and position.
10.10 Multilevel Models
Figure 10.9 Plots of the Junior School Project data.
Figure 10.10 Diagnostic plots for the Junior Schools Project model.
Figure 10.11 QQ plots of the random effects at the school and class levels.
Figure 10.12 Raw and adjusted school-quality measures. Three selected schools are marked.
Exercises
Chapter 11 Repeated Measures and Longitudinal Data
11.1 Longitudinal Data
Figure 11.1 The first 20 subjects in the PSID data. Income is shown over time.
Figure 11.2 Income change in the PSID data grouped by sex.
Figure 11.3 Slopes and intercepts for the individual income growth relationships are shown on the left. A comparison of income growth rates by sex is shown on the right.
Figure 11.4 QQ plots by sex.
11.2 Repeated Measures
Figure 11.5 Residuals vs. fitted plots for three levels of education: less than high school on the left, high school in the middle and more than high school on the right.
Table 11.1 Visual acuity of seven subjects measured in milliseconds of lag in responding to a light flash. The power of the lens causes an object six feet in distance to appear at a distance of 6, 18, 36 or 60 feet.
Figure 11.6 Visual acuity profiles. The left eye is shown as a solid line and the right as a dashed line. The four powers of lens displayed are 6/6, 6/18, 6/36 and 6/60.
Figure 11.7 Residuals vs. fitted plot is shown on the left and a QQ plot of the random effects for the eyes is shown on the right.
11.3 Multiple Response Multilevel Models
Figure 11.8 Scores on test compared to Raven score for subjects and genders.
Figure 11.9 Residuals vs. fitted plot broken down by subject.
Exercises
Chapter 12 Bayesian Mixed Effect Models
12.1 STAN
Figure 12.1 Diagnostic plots for μ from the STAN model for the pulp data. Version with a warm-up period is shown on the left. Four chains are shown in each case.
Figure 12.2 Posterior distributions for the standard deviations on the left and for the operator effects on the right.
Figure 12.3 Diagnostic plot for the MCMC for σb is shown on the left. Posterior densities for the random SDs are shown on the right.
Figure 12.4 Posterior densities for the blend effects are shown on the left, while the treatment effects are shown on the right.
12.2 INLA
Figure 12.5 Posterior densities for the SDs are shown on the right. On the left, we see the posterior densities for the operator effects.
Figure 12.6 Posterior densities for SDs on the left and for the treatment effects on the right.
12.3 Discussion
Exercises
Chapter 13 Mixed Effect Models for Nonnormal Responses
13.1 Generalized Linear Mixed Models
13.2 Inference
13.3 Binary Response
Figure 13.1 Subject effects for the stability experiment. Response is proportion of stable over treatment conditions.
Figure 13.2 QQ plots subsetted by treatment variables.
Figure 13.3 Posterior density for the subject SD on the left and posterior densities for the treatment effects on the right.
13.4 Count Response
Figure 13.4 Posterior distributions as produced by the STAN fit to the epilepsy data.
Figure 13.5 Seizures per 2-week period on a square-root scale with treatment group shown as solid lines and the placebo group shown as dotted lines in the plot on the left. Mean seizures per week is shown on the right. We compare the baseline period with the experimental period, distinguishing those who receive treatment or control.
Figure 13.6 Posterior distribution of the subject SD and drug effect for the epilepsy data.
13.5 Generalized Estimating Equations
Exercises
Chapter 14 Nonparametric Regression
Figure 14.1 Data examples. Example A has varying amounts of curvature, two optima and a point of inflexion. Example B has two outliers. The Old Faithful provides the challenges of real data.
14.1 Kernel Estimators
Figure 14.2 Nadaraya–Watson kernel smoother with a normal kernel for three different band-widths on the Old Faithful data.
Figure 14.3 The first panel shows the kernel estimated smooth of the Old Faithful data for a cross-validated choice of smoothing parameter. The second and third panels show the resulting fits for Examples A and B, respectively.
14.2 Splines
Figure 14.4 Smoothing spline fits. For Examples A and B, the true function is shown as solid and the spline fit as dashed.
Figure 14.5 One basis function for linear regression splines shown on the left and the complete set shown on the right.
Figure 14.6 Evenly spaced knots fit shown on the left and knots spread relative to the curvature on the right.
Figure 14.7 A cubic B-spline basis is shown in the left panel and the resulting fit to the Example A data is shown in the right panel.
14.3 Local Polynomials
14.4 Confidence Bands
Figure 14.8 Loess smoothing: Old Faithful data is shown in the left panel with the default amount of smoothing. Example A data is shown in the middle and B in the right panel. The true function is shown as a solid line along with the default choice (dotted) and respective optimal amounts of smoothing (dashed) are also shown.
14.5 Wavelets
Figure 14.9 95% confidence bands for loess (left) and spline (right) fits to Example A.
Figure 14.10 Haar mother wavelet and wavelet coefficients from decomposition for Example A.
Figure 14.11 Thresholding and inverting the transform. In the left panel all level-four and above coefficients are zeroed. In the right, the coefficients are thresholded using the default method. The true function is shown as a solid line and the estimate as a dashed line.
Figure 14.12 Mother wavelet is shown in the left panel — the Daubechies orthonormal compactly supported wavelet N=2 from the extremal phase family. The right panel shows the wavelet coefficients.
Figure 14.13 Daubechies wavelet N=2 thresholded fit to the Example A data shown on the left. Irregular wavelet fit to the Old Faithful data is shown on the right.
14.6 Discussion of Methods
14.7 Multivariate Predictors
Figure 14.14 Smoothing savings rate as a function growth and population under 15. Plot on the left is too rough while that on the right seems about right.
Figure 14.15 Smoothing spline fit to the savings data shown on the left. Loess smooth is shown on the right.
Exercises
Chapter 15 Additive Models
15.1 Modeling Ozone Concentration
Figure 15.1 Ozone concentration and three predictors. Loess fitted line and confidence band are shown.
Figure 15.2 Effects of predictors in a linear model for Ozone concentration.
15.2 Additive Models Using mgcv
Figure 15.3 Transformation functions for the model fit by mgcv. Note how the same scale has been deliberately used on all three plots. This allows us to easily compare the relative contribution of each variable.
Figure 15.4 The bivariate contour plot for temperature and ibh is shown in the left panel. The right panel shows a perspective view of the information on the left panel.
Figure 15.5 Residual plots for the additive model.
15.3 Generalized Additive Models
Figure 15.6 Transformation on the predictors for the Poisson GAM.
15.4 Alternating Conditional Expectations
Figure 15.7 ACE transformations: the first panel shows the transformation on the response while the remaining three show the transformations on the predictors.
15.5 Additivity and Variance Stabilization
Figure 15.8 AVAS transformations — the first panel shows the transformation on the response while the remaining three show the transformations on the predictors.
Figure 15.9 The left panel checks for simple fits to the AVAS transformation on the response given by the solid line. The log fit is given by the dashed line while the square-root fit is given by the dotted line. The right panel shows the residuals vs. fitted values plot for the AVAS model.
15.6 Generalized Additive Mixed Models
15.7 Multivariate Adaptive Regression Splines
Figure 15.10 Contribution of predictors in the MARS model.
Figure 15.11 Diagnostics for the MARS model.
Exercises
Chapter 16 Trees
16.1 Regression Trees
Figure 16.1 Tree model for the ozone data. On the left, the depth of the branches is proportional to the improvement in fit. On the right, the depth is held constant to improve readability. If the logical condition at a node is true, follow the branch to the left.
16.2 Tree Pruning
Figure 16.2 Residuals and fitted values for the tree model of the Ozone data are shown in the left panel. A QQ plot of the residuals is shown in the right panel.
Table 16.1 There are four data points arranged in a square. The number shows the value of y at that point.
Figure 16.3 Cross-validation plot for ozone tree model shown in the left panel and chosen tree model shown in the right panel.
16.3 Random Forests
Figure 16.4 MSE as a function of bootstrap sample size is shown on the left. Effect of temperature on ozone is shown on the right. The solid line is computed using the partial dependence method. The dashed line using the predicted RF response as temperature is varied and other predictors held at their means. The dotted line derives from a linear model.
16.4 Classification Trees
Figure 16.5 Historical kangaroo tree model. The left panel shows the three species as they vary with two of the measurements. The right panel shows the chosen tree.
16.5 Classification Using Forests
Exercises
Chapter 17 Neural Networks
Figure 17.1 A perceptron.
17.1 Statistical Models as NNs
Figure 17.2 NN equivalent of multivariate linear regression is shown on the left. It uses linear activation functions. Polynomial regression is shown on the right and uses powers for activation functions.
17.2 Feed-Forward Neural Network with One Hidden Layer
Figure 17.3 Feed-forward neural network with one hidden layer.
17.3 NN Application
Figure 17.4 Marginal effects of predictors for the NN fit. Other predictors are held fixed at their mean values.
Figure 17.5 Marginal effects of predictors for the NN fit with weight decay. Other predictors are held fixed at their mean values.
17.4 Conclusion
People also search for Extending The Linear Model With R 2nd:
faraway extending the linear model with r
borrow extending the linear model with r
faraway 2016 extending the linear model with r
extending the linear model with r solutions
extending the linear model with r second edition solutions
Tags: Extending, The Linear Model, Julian James Faraway, publication