Welcome to the notes for Predictive Modeling. The course is part of the MSc in Big Data Analytics from Carlos III University of Madrid.

The course is designed to have, roughly, one session per main topic in the syllabus. The schedule is tight due to time constraints, which will inevitably make the treatment of certain methods somehow superficial. Nevertheless, the course will hopefully give you a respectable panoramic view of different available statistical methods for predictive modeling. A broad view of the syllabus and its planning is:

  1. Introduction (first session)
  2. Linear models I (first/second session)
  3. Linear models II (second/third session)
  4. Linear models III (third/fourth session)
  5. Generalized linear models (fifth/sixth session)
  6. Nonparametric regression (sixth/seventh session)

Some logistics for the development of the course follow:

  • Office hours are described in the Aula Global (right panel).
  • Questions and comments during lectures are most welcome. Particularly if these are clarifications, comments, or alternative perspectives that may help the rest of the class. So just go ahead and fire!
  • Detailed course evaluation guidelines can be found in the Aula Global. Recall that participation in lessons is positively evaluated.

Main references and credits

Several great reference books have been used for preparing these notes. The following list presents the books that have been consulted:

These notes are possible due to the existence of the incredible pieces of software by Xie (2016), Xie (2020), Allaire et al. (2020), Xie and Allaire (2020), and R Core Team (2020). Also, certain hacks to improve the design layout have been possible due to the outstanding work of Úcar (2018). The icons used in the notes were designed by madebyoliver, freepik, and roundicons from Flaticon.

Last but not least, the notes have benefited from contributions from the following people:


Contributions, reporting of typos, and feedback on the notes are very welcome. Just send an email to and give me a good reason for writing your name in the list of contributors!


All the material in these notes is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License (CC BY-NC-ND 4.0). You may not use this material except in compliance with the aforementioned license. The human-readable summary of the license states that:

  • You are free to:
    • Share – Copy and redistribute the material in any medium or format.
  • Under the following terms:
    • Attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • NonCommercial – You may not use the material for commercial purposes.
    • NoDerivatives – If you remix, transform, or build upon the material, you may not distribute the modified material.


You may use the following \(\mathrm{B{\scriptstyle{IB}} \! T\!_{\displaystyle E} \! X}\) entry when citing these notes:

    title        = {Notes for Predictive Modeling},
    author       = {Garc\'ia-Portugu\'es, E.},
    year         = {2023},
    note         = {Version 5.9.12. ISBN 978-84-09-29679-8},
    url          = {}

You may also want to use the following template:

García-Portugués, E. (2023). Notes for Predictive Modeling. Version 5.9.12. ISBN 978-84-09-29679-8. Available at


Allaire, J. J., Y. Xie, J. McPherson, J. Luraschi, K. Ushey, A. Atkins, H. Wickham, J. Cheng, W. Chang, and R. Iannone. 2020. rmarkdown: Dynamic Documents for R.
Chacón, J. E., and T. Duong. 2018. Multivariate Kernel Smoothing and Its Applications. Vol. 160. Monographs on Statistics and Applied Probability. Boca Raton: CRC Press.
DasGupta, A. 2008. Asymptotic Theory of Statistics and Probability. Springer Texts in Statistics. New York: Springer.
Durbán, M. 2017. Modelización Estadística. Lecture notes.
Fan, J., and I. Gijbels. 1996. Local Polynomial Modelling and Its Applications. Vol. 66. Monographs on Statistics and Applied Probability. London: Chapman & Hall.
Hastie, T., R. Tibshirani, and J. Friedman. 2009. The Elements of Statistical Learning. Springer Series in Statistics. New York: Springer.
James, G., D. Witten, T. Hastie, and R. Tibshirani. 2013. An Introduction to Statistical Learning. Vol. 103. Springer Texts in Statistics. New York: Springer.
Kuhn, M., and K. Johnson. 2013. Applied Predictive Modeling. New York: Springer.
Li, Q., and J. S. Racine. 2007. Nonparametric Econometrics. Princeton: Princeton University Press.
Loader, C. 1999. Local Regression and Likelihood. Statistics and Computing. New York: Springer.
McCullagh, P., and J. A. Nelder. 1983. Generalized Linear Models. Monographs on Statistics and Applied Probability. London: Chapman & Hall.
Peña, D. 2002. Regresión y Diseño de Experimentos. Madrid: Alianza Editorial.
R Core Team. 2020. R: A Language and Environment for Statistical Computing. Vienna.
Seber, G. A. F. 1984. Multivariate Observations. Wiley Series in Probability and Mathematical Statistics: Probability and Mathematical Statistics. New York: John Wiley & Sons.
Seber, G. A. F., and A. J. Lee. 2003. Linear Regression Analysis. Wiley Series in Probability and Statistics. Hoboken: Wiley-Interscience.
Úcar, I. 2018. “Energy Efficiency in Wireless Communications for Mobile User Devices.” PhD thesis, Universidad Carlos III de Madrid.
Wand, M. P., and M. C. Jones. 1995. Kernel Smoothing. Vol. 60. Monographs on Statistics and Applied Probability. London: Chapman & Hall.
Wasserman, L. 2004. All of Statistics. Springer Texts in Statistics. New York: Springer-Verlag.
———. 2006. All of Nonparametric Statistics. Springer Texts in Statistics. New York: Springer-Verlag.
Wood, S. N. 2006. Generalized Additive Models. Texts in Statistical Science Series. Boca Raton: Chapman & Hall/CRC.
Xie, Y. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. The r Series. Boca Raton: CRC Press.
———. 2020. knitr: A General-Purpose Package for Dynamic Report Generation in R.
Xie, Y., and J. J. Allaire. 2020. tufte: Tufte’s Styles for R Markdown Documents.