plot.glmmhp | R Documentation |
glmm.hp
objectPlot for a glmm.hp
object
## S3 method for class 'glmmhp'
plot(x, plot.perc = FALSE, color = NULL, n = 1, dig = 4, ...)
x |
A |
plot.perc |
Logical;if TRUE, the bar plot (based on ggplot2 package) of the percentage to individual effects of variables or groups towards total explained variation, the default is FALSE to show plot with original individual effects. |
color |
Color of variables. |
n |
Integer; which marginal R2 in output of r.squaredGLMM to plot. |
dig |
Integer; number of decimal places in Venn diagram. |
... |
unused |
a ggplot object
Jiangshan Lai lai@njfu.edu.cn
library(MuMIn)
library(lme4)
mod1 <- lmer(Sepal.Length ~ Petal.Length + Petal.Width +(1 | Species), data = iris)
a <- glmm.hp(mod1)
plot(a)
mod3 <- lm(Sepal.Length ~ Petal.Length+Petal.Width,data = iris)
plot(glmm.hp(mod3,type="R2"))
plot(glmm.hp(mod3,commonality=TRUE),color = c("#8DD3C7", "#FFFFB3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.