How to show explained variance in a multilevel model

[This article was first published on Daniel MarcelinoDaniel Marcelino » R, 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.

In this post I will show one way to display explained variance using a line chart. There is no default plot for displaying the effect of each factor on deviance of the model, so this is a tentative proposal for my dissertation. The following values were obtained using multilevel models performed in R (thanks for nlme and lme4 packages). Basically, this chart shows the declining variance for each level when each independent parameter is included in the model. You can find the full script below of the chart.
Variance_explained
\—|\—|-> Var explained graph < \---|\---|-
camara2002
df1
camara2006
df3
senado2002
df2
senado2006
df4
##\—|\—|> End not run <\---|\---|-

To leave a comment for the author, please follow the link and comment on their blog: Daniel MarcelinoDaniel Marcelino » R.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)