plot.R2: Visualize standardized effect sizes and model R squared

Description Usage Arguments Value Examples

View source: R/plot_r2_Function.R

Description

Visualize standardized effect sizes and model R squared

Usage

1
2
3
## S3 method for class 'R2'
plot(x, y = NULL, txtsize = 10, maxcov = 3, r2labs = NULL,
  r2mthd = "sgv", cor = TRUE, ...)

Arguments

x

An R2 object from the r2beta function.

y

An R2 object from the r2beta function.

txtsize

The text size of the axis labels.

maxcov

Maximum number of covariates to include in the semi-partial plots.

r2labs

a character vector containing labels for the models. The labels are printed as subscripts on a covariance model matrix.

r2mthd

The method used to compute R2

cor

An argument to be passed to the r2dt function. Only relevant if comparing two R2 objects.

...

Arguments to be passed to plot

Value

A visual representation of the model and semi-partial R squared from the r2 object provided.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(nlme)
library(r2glmm)

data(Orthodont)

# Linear mixed model
lmemod = lme(distance ~ age*Sex, random = ~1|Subject, data = Orthodont)

r2 = r2beta(model=lmemod,partial=TRUE,method='sgv')

plot(x=r2)

Example output



r2glmm documentation built on May 1, 2019, 9:09 p.m.