In this article, we will be talking about the importance of cross-validation to choose the best model. To do this, we will show: the problem of using simple in-sample metrics for model selection with a univariate example the problem of using simple in-sample metrics for model selection with a multivariable example how to perform cross-validation using simple linear regression and some problems associated with this 1) The problem of using simple in-sample metrics for model seelction with a univariate example When dealing with a regression model, we are often interested in determining which covariates to keep in the model and which to through away.
link to folder
Introduction This is an introductory post into using Bookdown. Bookdown is a powerful package that allows you to create documents embedding images, tables, and code. One great reason to use Bookdown is that you can put results and images from your code directly into your text, which reduces the chances of copying errors. For this post, I’m going to focus on creating an HTML document, though you can also create outputs in Word and PDF formats.
link to data Introduction to using for loops What Are Loops? “Looping”, “cycling”, “iterating” or just replicating instructions is an old practice that originated well before the invention of computers. It is nothing more than automating a multi-step process by organizing sequences of actions or ‘batch’ processes and by grouping the parts that need to be repeated. All modern programming languages provide special constructs that allow for the repetition of instructions or blocks of instructions.
link to R script