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 methods should the plot be made?
lwd.line Line width for drawing the density.
col.line Color for drawing the densities.
lty.line Line type for drawing the densities.
grid Logical. Should a vertical grid be set up? If numeric it is set up at the values specified. If same.ax, the range of the grid is taken to be the extent of the x-axis for all plots.
col.grid The color of the grid.
rug Should a small rug at the bottom show posterior quantiles?
probs Numeric vector with numbers in the range from 0 to 100, indicating the posterior percentiles to be shown in the rug.
tot.var Should 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, check.MethComp

Examples

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

[Package MethComp version 0.3.0 Index]