densityplot {eiPack}R Documentation

Density plots for population level parameters

Description

Generates a density plot for population level quantities of interest output by lambda.MD, lambda.reg, and lambda.reg.bayes. For the Bayesian methods, densityplot plots the kernel density for the draws. For the frequentist lambda.reg method, densityplot plots the canonical Normal density conditional on the mean and standard error output by lambda.reg.

Usage

## S3 method for class 'lambdaMD'
densityplot(x, by = "column", col, xlim, ylim,
             main = "", sub = NULL, xlab, ylab,
             lty = par("lty"), lwd = par("lwd"), ...)
## S3 method for class 'lambdaRegBayes'
densityplot(x, by = "column", col, xlim, ylim,
             main = "", sub = NULL, xlab, ylab,
             lty = par("lty"), lwd = par("lwd"), ...)
## S3 method for class 'lambdaReg'
densityplot(x, by = "column", col, xlim, ylim,
             main = "", sub = NULL, xlab, ylab,
             lty = par("lty"), lwd = par("lwd"), ...)

Arguments

x

output from lambda.MD, lambda.reg, or lambda.reg.bayes.

by

character string (defaulting to "column") specifying whether to panel the density plot by "row" or "column" marginal.

col

an optional vector of colors, with length corresponding to the number of marginals selected in by. Defaults to rainbow.

xlim, ylim

optional limits for the x-axis and y-axis, passed to plot.

main, sub

optional title and subtitle, passed to plot.

xlab, ylab

optional labels for the x- and y-axes, passed to plot.

lty, lwd

optional arguments for line type and line width, passed to lines and plot. If either lty or lwd are vectors, it must correspond to the number of row or column marginals selected.

...

additional arguments passed to par.

Value

A plot with density lines for the selected margin (row or column).

Author(s)

Olivia Lau <olivia.lau@post.harvard.edu>

See Also

plot, segments, par


[Package eiPack version 0.2-2 Index]