Book Image

R Statistical Application Development by Example Beginner's Guide

By : Prabhanjan Narayanachar Tattar
Book Image

R Statistical Application Development by Example Beginner's Guide

By: Prabhanjan Narayanachar Tattar

Overview of this book

<p>"R Statistical Application Development by Example Beginner’s Guide" explores statistical concepts and the R software, which are well integrated from the word go. This demarcates the separate learning of theory and applications and hence the title begins with “R Statistical …”. Almost every concept has an R code going with it which exemplifies the strength of R and applications. Thus, the reader first understands the data characteristics, descriptive statistics, and the exploratory attitude which gives the first firm footing of data analysis. Statistical inference and the use of simulation which makes use of the computational power complete the technical footing of statistical methods. Regression modeling, linear, logistic, and CART, builds the essential toolkit which helps the reader complete complex problems in the real world.<br /><br />The reader will begin with a brief understanding of the nature of data and end with modern and advanced statistical models like CART. Every step is taken with DATA and R code.<br /><br />The data analysis journey begins with exploratory analysis, which is more than simple descriptive data summaries, and then takes the traditional path up to linear regression modeling, and ends with logistic regression, CART, and spatial statistics.<br /><br />True to the title R Statistical Application Development by Example Beginner’s Guide, the reader will enjoy the examples and R software.</p>
Table of Contents (18 chapters)
R Statistical Application Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
References
Index

Time for action – residual plots for model validation


The R functions resid and fitted can be used to extract residuals and fitted values from an lm object.

  1. Find the residuals of the fitted regression model using the resid function: IO_lm_resid <- resid(IO_lm).

  2. We need six plots, and hence we invoke the graphics editor with par(mfrow = c(3,2)).

  3. Sketch the plot of residuals against the predictor variable with plot(No_of_IO, IO_lm_resid).

  4. To check whether the regression model is linear or not, obtain the plots of absolute residual values against the predictor variable and also that of squared residual values against the predictor variable respectively with plot(No_of_IO, abs(IO_lm_resid),…) and plot(No_of_IO, IO_lm_resid^2,…).

  5. The assumption that errors have constant variance may be verified by the plot of residuals against the fitted values of the regressand. The required plot is obtained by using plot(IO_lm$fitted.values,IO_lm_resid).

  6. The assumption that the errors are independent of each other...