plot.glmmhp: Plot for a 'glmm.hp' object

View source: R/plot.glmmhp.r

plot.glmmhpR Documentation

Plot for a glmm.hp object

Description

Plot for a glmm.hp object

Usage

## S3 method for class 'glmmhp'
plot(x, plot.perc = FALSE, color = NULL, n = 1, dig = 4, ...)

Arguments

x

A glmm.hp object.

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

Value

a ggplot object

Author(s)

Jiangshan Lai lai@njfu.edu.cn

Examples

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"))

glmm.hp documentation built on Oct. 26, 2024, 9:06 a.m.

Related to plot.glmmhp in glmm.hp...