# Mixed-Effects Models in R with Quantum Forest

**Revolutions**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

For anyone who wants to estimate linear or nonlinear mixed-effects models (aka random-effects models, hierarchical models or multilevel models) using the R language, the Quantum Forest blog has several recent posts that will be of interest. Written by Luis Apiolaza from the School of Forestry at the University of Canterbury in New Zealand, the blog includes a number of illustrated examples of using the open-source lme4 package and the proprietary asreml-r package.

Recent posts include an overview of linear mixed models in R, and worked examples of analyzing forestry yields using a family model and visualizing correlations (using the lattice and ggplot2 packages) — and it's well worth browsing the archives for many other interesting posts about mixed-effects modeling. (By the way, if you're looking even more in-depth resources, the 2009 edition of book Mixed-Effects Modeling in S and S-PLUS is, despite the name, the best reference for using the lme4 package in R. Draft chapters from the forthcoming book lme4: Mixed Effects Modeling in R are also available online. If you have ASReml, Dr Apiolaza's asreml-r cookbook is a handy supplement to the standard documentation.)

The Quantum Forest blog also has several posts on more general R-related topics as will, such as how to find the solution to general maximum likelihood problems in R, and how to simulate data with a defined correlation structure. Also, as someone who has switched from using SAS to R for teaching, Dr Apiolaza has some interesting perpectives on SAS versus R. His summary of reasons why he chooses R over SAS for academic and commercial use is a good one, and I reproduce it verbatim here:

- There is good integration between the programming language and the statistical functions. Both SAS macros and IML are poorly integrated with the data step and procs.
- R is highly conducive to exploratory data analysis; visualization functions (either the lattice or the ggplot 2 packages) produce high quality plots that really help developing ideas to build models.
- Statistics is not defined by the software. If someone develops a new methodology or algorithm chances are that there will be an R implementation almost immediately. If I want to test a new idea I can scramble to write some code that connects packages developed by other researchers.
- It is relatively easy to integrate R with other languages, for example Python, to glue a variety of systems.
- asreml-r!
- I can exchange ideas with a huge number of people, because slowly R is becoming the de facto standard for many disciplines that make use of statistics.

Thanks to Dr Apiolaza for sharing such useful information; I've added Quantum Forest blog to my RSS feed and I look forward to more.

Quantum Forest: A shoebox for scribbles on data analysis

**leave a comment**for the author, please follow the link and comment on their blog:

**Revolutions**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.