![]() Inside the brackets is read as y (your dependent variable) is a function of x (your independent variable) and is called a formula (exactly the same as last week). Lme stands for linear mixed effects model. Random Intercept Model ***mod <- lme(y~x, random = ~1 Using the above data set we will run a random intercept model to account for site-level variability, a random intercept and random slope model accounting for site-level variability, and a nested random slope model accounting for site and pool within site-level variability. I collected 12 replicate samples at 15 different tide pools within 4 different sites. I am going to use mixed effects models to test the relationship between net community production (NCP) and pH while accounting for within and between site-level variability. Today, we will use some of my biogeochemistry data. This post focuses on how to write a a random intercept, random slope and intercept, and nested mixed effects model in the nlme package.
0 Comments
Leave a Reply. |