knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

This is a set of notes on simple linear regression.

What does regression do?

Regression typically is involved in 3 potentially related tasks

  1. Model selection
  2. Prediction
  3. Inference

For the milk data, relevant aspects of these tasks might be:

Model selection can have as its end goal either used for inference or prediction. For inference, the "best" model is considered to have, relative to the other models, a higher chance of representing causal relationships. However, if a model the corresponds to reality isn't included in the set of models examined, any inference about causation will be spurious. Moreover, investigation about causation is always best grounded in experimentation, and the milk dataset. For prediction, model selection is about finding the strongest statistical association between y and x variables

Prediction can be agnostic to inference; the prediction just has to be accurate, regardless of the actual causal relationship between the y and the x variable. Stated another way, prediction is about the statistical relationship between 2 variables.

Steps in regression

Aside: what do I mean by "multilevel" or "hiearchical"

Multilevel Examples

Regression models in R using lm()

Focal data subset: Primates & Relatives

Rodents are relatively closely related to primates; this is one reason why mouse models are often useful for biomedical studies.



brouwern/mammalsmilk documentation built on May 17, 2019, 10:38 a.m.