plot.VarComp {MethComp}R Documentation

Plot the a posteriori densities for variance components

Description

When a method comparison model i fitted and stored in a MethComp object, then the posterior distributions of the variance components are plotted, in separate displays for method.

Usage

  plot.VarComp( x,
            which,
         lwd.line = rep(2, 4),
         col.line = c("red", "green", "blue", "black"),
         lty.line = rep(1, 4),
             grid = TRUE,
         col.grid = gray(0.8),
              rug = TRUE,
            probs = c(5, 50, 95),
          tot.var = FALSE,
          same.ax = TRUE,
       meth.names = TRUE,
         VC.names = "first",
              ... )
  

Arguments

x A MethComp object.
which For which of the compared method should the plot be made?
lwd.line Line witdth for drawing the density.
col.line Color for drawing the density.
lty.line Line type for drawing the density.
grid Logical. SHoud a vertical grid be set up. If numeric it is set up at the values specified.
col.grid The color of the grid.
rug Shoudl a small rug at the bottom show posterior quantiles?
probs Numeric vector with nu,bers in the range from 0 to 100. What quantiles should be shown,
tot.var Shoudl the posterior of the total variance also be shown.
same.ax Should the same axes be used for all methods?
meth.names Should the names of the methods be put on the plots.
VC.names Should the names of the variance components be put on the first plot ("first"), the last ("last"), all ("all") or none ("none"). Only the first letter is needed.
... Parameters passed on the density furnction that does the smoothing of the posterior samples.

Details

The function generates a series of plots, one for each method compared in the MethComp object supplied (or those chosen by which=). Therefore the user must take care to set mfrow or mfcol to capture all the plots.

Value

A list with one element for each method. Each element of this is a list of densities, i.e. of objects of class density, one for each variance component.

Author(s)

Bendix Carstensen, www.biostat.ku.dk/~bxc

See Also

plot.MethComp, MethComp

Examples

  data( ox )
  MC.ox <- MethComp( ox )
  par( mfrow=c(2,1) )
  plot.VarComp( MC.ox, grid=c(0,15) )
  

[Package MethComp version 0.1.15 Index]