Introduction to R, Part III Linear and Mixed Models in R
[SQUEAKING] [RUSTLING] [CLICKING] HELENA VAILLICROSA: OK. So now, we're just going to jump directly into how to use R for statistics. I'm going to make a very quick tutorial about how to apply linear models into the data, also general linear models and mixed models. I'm not going to cover the mathematical principles of that. I'm just going to show you how to apply those models with code. So first of all, I'm just going to start over with all the objects here, just cleaning a little bit, so it's not distracting us. It's just going to charge again the database we've been working with based on nitrogen, and phosphorus, and potassium fertilization in yields. Oops, sorry. OK. So this is how the structure of a linear model should look like. First of all, we create the name of the model, model number 1. We assign all of these into model number 1-- LM, which is linear model. And here, we're going to have our dependent variable, the y, which is ...