plot.straineff.ci: Plot approximate posterior credible intervals of additive...

View source: R/plot_lib.R

plot.straineff.ciR Documentation

Plot approximate posterior credible intervals of additive haplotype effects as a caterpillar plot

Description

This function takes a Diploffect.INLA summary object and plots the posterior credible intervals of the additive haplotype effects.

Usage

## S3 method for class 'straineff.ci'
plot(
  inla.diploffect.ci,
  sn = NULL,
  xlab = "Haplotype Effects",
  main = NULL,
  main.cex = 1,
  main.line = 2,
  include.top.axis = TRUE,
  flip = FALSE,
  ...
)

Arguments

inla.diploffect.ci

A Diploffect.INLA summary object. Output from run.diploffect.inla.summary.stats(). Contains credible information for various model parameters.

sn

DEFAULT: NULL. Strain names to be used as labels in the plot. Will default to the names used in the Diploffect.INLA model probabilities.

xlab

DEFAULT: "Haplotype Effects". Label for the x axis of the plot.

main

DEFAULT: "". Title for the plot.

flip

DEFAULT: FALSE. Flips the order of the haplotypes. Allows a little flexibility in how the effects are arranged.

Value

Nothing. Produces plot.

Examples

library(Diploffect.INLA)
data(exampleCC)
data(locusmatrix)
inla.diploffect <- run.diploffect.inla(formula=y~1+(1|strain)+(1|dose.date), add.on=FALSE, data=exampleCC, K=NULL,
                                       prob.matrix=locusmatrix,
                                       num.draws=10, 
                                       use.dip.lincomb=TRUE, seed=1, gamma.rate=1, impute.on="CCline")
inla.diploffect.summary <- run.diploffect.inla.summary.stats(inla.diploffect)
plot.straineff.ci(inla.diploffect.summary, flip=FALSE)

gkeele/Diploffect.INLA documentation built on May 17, 2023, 8:37 a.m.