covplot.stats {MIfuns}R Documentation

Calculate Statistics for "Forest Plots"

Description

covplot.stats() is a replacement for boxplot.stats(), and serves as the default 'stats' argument for covplot(), called via boxplot.prestats().

Usage

covplot.stats(x,y,z,influence,coef,do.out=TRUE,transform="x*1",file=NULL,...)

Arguments

x Numeric vector of bootstrap estimates of a single parameter.
y A numeric value, possibly named, representing an estimate of a primary model parameter.
z Values of a covariate influencing y, on which x was estimated.
influence A vector of expressions (or character equivalents) stating the relationships among x,y,z, and possibly "...".
coef Like coef in boxplot.stats, expected but ignored.
do.out Logical indicating whether to plot outliers.
transform An expression (or character) used to transform all stats.
file Path (as necessary) and name of a file in which to append the actual values calculated.
... Extra arguments available to influence expressions.

Details

Any substitute for boxplot.stats() must return 5 values representing a lower whisker, a lower box edge, a box center, an upper box edge, and an upper whisker.

covplot.stats() accepts the arguments expected by boxplot.stats(). Additionally, it requires y, z, and influence. If z is atomic, covplot.stats() treats the covariate is categorical; otherwise it treats the covariate as continuous.

For categorical covariates, the box has zero width. The whiskers are the the 95 percentiles of the influence expression evaluated on all x; box center is the corresponding median.

For continuous covariates, x takes on its median value, then the box ends are the influence expression evaluated at the 95 percentiles of z; box center is evaluated at the median of z.. The whiskers are, again, the 95 percentiles of the influence expression evaluated on all x, but repeated for the 95 percentiles of z and retaining the extremes of the four results (which are not predictably ordered in the presence of negative arguments).

Value

Like the return value of boxplot.stats().

Note

The transform expression must contain at least "x". Nothing will be written to file if file==NULL. Like boxplot.stats(), covplot.stats() does not do "conf" (notches): these are set to the values of the box ends.

Author(s)

Tim Bergsma

See Also

as.distribution, covplot, panel.covplot boxplot.stats bwplot


[Package MIfuns version 3.2.9 Index]