REGRESSION ANALYSIS
Linear, diagnostic and nonlinear regression models for agricultural research
Welcome

Welcome to Regression Analysis, a postgraduate textbook on linear, diagnostic and nonlinear regression models, prepared at the Department of Agricultural Statistics, College of Agriculture, Vellayani, Kerala Agricultural University.
Regression is the workhorse of quantitative agricultural research. A nitrogen response curve, a yield prediction equation built from weather variables, a growth curve fitted to dry matter accumulation, a selection index in plant breeding: each of these is a regression model. Yet the method is often used as a button in a software package, with little attention to the assumptions it rests on or to the diagnostics that tell us whether those assumptions hold.
This book develops regression from its matrix foundations. The model \(\mathbf{y}=\mathbf{X}\boldsymbol{\beta}+\boldsymbol{\varepsilon}\) is introduced early, and every result that follows (the least squares estimator, the hat matrix, the Gauss–Markov theorem, the analysis of variance, the influence measures) is derived from it step by step. Each derivation is followed by a worked example that can be checked by hand and then reproduced in R, so that the algebra and the computation always support each other.
The book covers the complete syllabi of two Kerala Agricultural University courses:
- STAT 567 Regression Analysis (1+1), a major course for M.Sc. (Agricultural Statistics), and
- STAT 521 Applied Regression Analysis (2+1), a minor/supporting course for M.Sc. and Ph.D. students of all disciplines.
A unit-by-unit map of both syllabi to the chapters of this book is given in Appendix C — Syllabus Coverage, and a complete set of R practicals is given in Appendix B — R Practicals.
How to use this book
- Chapters 1 to 3 revise correlation and simple linear regression. Students of STAT 521 who come from agricultural, horticultural or social science backgrounds should begin here.
- Chapters 4 to 7 develop the general linear model in matrix notation. Readers who need to revise matrix algebra (rank, trace, idempotent matrices, generalized inverses) should first read Appendix A — Matrix Results Used in Regression.
- Chapters 8 to 12 deal with checking a fitted model: residuals, leverage and influence, autocorrelated errors, multicollinearity and unequal variances.
- Chapters 13 to 17 extend the model: polynomial and response curves, indicator variables, variable selection, robust regression and nonlinear regression.
Every chapter closes with a Chapter Summary containing fill in the blanks, short-answer questions, numerical and conceptual questions, important formulae and a quick revision list, with answers at the end.
All data sets used in the book are available in the csv/ folder of the book repository. They are illustrative data generated to behave like typical field data, so that every method can be demonstrated on a known structure. The script that creates them is data-raw/make_data.R.
Software
All computations are done in R (R Core Team 2025). Besides base R, the packages MASS, car and lmtest are used. They can be installed with:
install.packages(c("MASS", "car", "lmtest"))Note from the Publisher
This textbook is published by PAPAYA, the academic publishing division of Statoberry LLP. PAPAYA is dedicated to producing rigorous, well-designed educational resources for the agricultural research community, and to keeping foundational knowledge freely accessible wherever possible.
In keeping with this commitment, the online edition of this book is made available free of charge as part of our open-access initiative. For more information about this publication, or to explore other titles from this division, please visit PAPAYA.
Copyright Information
© 2026 Statoberry LLP. The online edition is licensed under the Creative Commons Attribution–NonCommercial–NoDerivatives 4.0 International licence, as stated in the footer. Rights not granted by this licence are reserved.
ISBN: _______________
For commercial use or other uses outside this licence, prior written permission from Statoberry LLP is required.