autoplot.Wald_lmm: Graphical Display For Linear Hypothesis Test

autoplot.Wald_lmmR Documentation

Graphical Display For Linear Hypothesis Test

Description

Graphical Display For Linear Hypothesis Test

Usage

## S3 method for class 'Wald_lmm'
autoplot(object, type = "forest", size.text = 16, add.args = NULL, ...)

## S3 method for class 'Wald_lmm'
plot(x, ...)

Arguments

object, x

a Wald_lmm object.

type

[character] what to display: a forest plot ("forest") or a heatmap ("heat").

size.text

[numeric, >0] size of the font used to display text.

add.args

[list] additional arguments used to customized the graphical display. Must be a named list. See details.

...

arguments passed to the confint method.

Details

Argument add.args: parameters specific to the forest plot:

  • color: [logical] should the estimates be colored by global null hypothesis, e.g. when testing the effect of a 3 factor covariate, the two corresponding coefficient will have the same color. Alternatively a vector of positive integers giving the color with which each estimator should be displayed.

  • color: [logical] should the estimates be represented by a different shape per global null hypothesis, e.g. when testing the effect of a 3 factor covariate, the two corresponding coefficient will have the same type of point. Alternatively a vector of positive integers describing the shape to be used for each estimator.

  • ci: [logical] should confidence intervals be displayed?

  • size.estimate: [numeric, >0] size of the dot used to display the estimates.

  • size.ci: [numeric, >0] thickness of the line used to display the confidence intervals.

  • width.ci: [numeric, >0] width of the line used to display the confidence intervals.

  • size.null: [numeric, >0] thickness of the line used to display the null hypothesis.

Parameters specific to the heatmap plot:

  • limits: [numeric vector of length 2] minimum and maximum value of the colorscale relative to the correlation.

  • low, mid, high: [character] color for the the colorscale relative to the correlation.

  • midpoint: [numeric] correlation value associated with the color defined by argument mid

Value

A list with two elements

  • data: data used to create the graphical display.

  • plot: ggplot object.

Functions

  • plot(Wald_lmm): Graphical Display For Linear Hypothesis Test

Examples

## From the multcomp package
if(require(datasets) && require(ggplot2)){

## only tests with 1 df
ff <- Fertility ~ Agriculture + Examination + Education + Catholic + Infant.Mortality
e.lmm <- lmm(ff, data = swiss)
e.aovlmm <- anova(e.lmm)

autoplot(e.aovlmm, type = "forest")
autoplot(e.aovlmm, type = "heat") ## 3 color gradient
autoplot(e.aovlmm, type = "heat", add.args = list(mid = NULL)) ## 2 color gradient

## test with more than 1 df
e.lmm2 <- lmm(breaks ~ tension + wool, data = warpbreaks)
e.aovlmm2 <- anova(e.lmm2)
autoplot(e.aovlmm2)
autoplot(e.aovlmm2, add.args = list(color = FALSE, shape = FALSE))
}


LMMstar documentation built on Nov. 9, 2023, 1:06 a.m.