| HH-package {HH} | R Documentation |
Statistical Analysis and Data Display: Heiberger and Holland
Description
Support software for Statistical Analysis and Data Display (Second Edition, Springer, ISBN 978-1-4939-2121-8, 2015) and (First Edition, Springer, ISBN 0-387-40270-5, 2004) by Richard M. Heiberger and Burt Holland. This contemporary presentation of statistical methods features extensive use of graphical displays for exploring data and for displaying the analysis. The second edition includes redesigned graphics and additional chapters. The authors emphasize how to construct and interpret graphs, discuss principles of graphical design, and show how accompanying traditional tabular results are used to confirm the visual impressions derived directly from the graphs. Many of the graphical formats are novel and appear here for the first time in print. All chapters have exercises. All functions introduced in the book are in the package. R code for all examples, both graphs and tables, in the book is included in the scripts directory of the package.
Details
The DESCRIPTION file:
| Package: | HH |
| Type: | Package |
| Title: | Statistical Analysis and Data Display: Heiberger and Holland |
| Version: | 3.1-52 |
| Date: | 2024-02-10 |
| Author: | Richard M. Heiberger |
| Maintainer: | Richard M. Heiberger <rmh@temple.edu> |
| Depends: | R (>= 3.0.2), lattice, stats, grid, latticeExtra, multcomp, gridExtra (>= 2.0.0), graphics |
| Imports: | reshape2, leaps, vcd, colorspace, RColorBrewer, shiny (>= 0.13.1), Hmisc, abind, Rmpfr (>= 0.6.0), grDevices, methods |
| Suggests: | mvtnorm, car, Rcmdr, RcmdrPlugin.HH, microplot |
| Description: | Support software for Statistical Analysis and Data Display (Second Edition, Springer, ISBN 978-1-4939-2121-8, 2015) and (First Edition, Springer, ISBN 0-387-40270-5, 2004) by Richard M. Heiberger and Burt Holland. This contemporary presentation of statistical methods features extensive use of graphical displays for exploring data and for displaying the analysis. The second edition includes redesigned graphics and additional chapters. The authors emphasize how to construct and interpret graphs, discuss principles of graphical design, and show how accompanying traditional tabular results are used to confirm the visual impressions derived directly from the graphs. Many of the graphical formats are novel and appear here for the first time in print. All chapters have exercises. All functions introduced in the book are in the package. R code for all examples, both graphs and tables, in the book is included in the scripts directory of the package. |
| License: | GPL (>= 2) |
Index of help topics:
AEdotplot AE (Adverse Events) dotplot of incidence and
relative risk
AEdotplot.data.frame AE (Adverse Events) dotplot of incidence and
relative risk, support functions
CIplot Illustration of the meaning of confidence
levels.
Discrete4 Discrete with four levels color dataset.
EmphasizeVerticalPanels
Helper function for likertWeighted(). used for
vertical spacing and horizontal borders of
grouped panels.
F.curve plot a chisquare or a F-curve.
GSremove Remove selected GraphSheetPages in the S-Plus
Windows GUI Graphsheet
HH-package Statistical Analysis and Data Display:
Heiberger and Holland
HH.regsubsets Display tabular results for Best Subsets
Regression.
HHscriptnames Find absolute pathname of a script file for the
HH book in the HH package.
InsertVerticalPanels Expand a 3D array on the second dimension,
inserting empty layers where the input vector
has a '0' value. A 2D argument 'x' with
'dim(x)==c(r,c)' is first extended to 3D with
'dim(x)==c(1,r,c)', and then the result is
collapsed back to 2D.
LikertPercentCountColumns
Display likert plots with percents in the first
column of panels and counts in the second
column of panels.
NTplot Specify plots to illustrate Normal and t
Hypothesis Tests or Confidence Intervals,
including normal approximation to the binomial.
NormalAndTPower Construct a power graph based on the NTplot.
NormalAndTplot Specify plots to illustrate Normal and t
Hypothesis Tests or Confidence Intervals.
OddsRatio Calculate or plot the odds ratio for a 2x2
table of counts.
OneWayVarPlot Displays a three-panel 'bwplot' of the data by
group, of the group means, and of the entire
dataset. This is an approximate visualization
of the Mean Square lines from the ANOVA table
for a one-way ANOVA model.
ResizeEtc Display multiple independent trellis objects on
the same coordinated scale.
ResizeEtc.likertPlot Display multiple independent trellis objects,
representing likert plots, on the same
coordinated scale.
ToBW.likert Change colors in a likert plot to shades of
Black and White.
X.residuals Residuals from the regression of each column of
a data.frame against all the other columns.
ae.dotplot AE (Adverse Events) dotplot of incidence and
relative risk
ancova Compute and plot oneway analysis of covariance
ancova-class Class "ancova" Analysis of Covariance
ancovaplot Analysis of Covariance Plots
anova.ancovaplot ANOVA table for a c("ancovaplot","trellis")
object.
anovaMean ANOVA table from the group sample sizes, means,
and standard deviations.
aovSufficient Analysis of variance from sufficient statistics
for groups.
arima.diag.hh Repair design error in S-Plus arima.diag
arma.loop Loop through a series of ARIMA models and
display coordinated tables and diagnoastic
graphs.
as.likert Support functions for diverging stacked
barcharts for Likert, semantic differential,
and rating scale data.
as.matrix.listOfNamedMatrices
Convert a list of numeric matrices to a single
matrix
as.multicomp Support functions in R for MMC (mean-mean
multiple comparisons) plots.
as.rts Miscellaneous functions that I wish were in or
consistent between S-Plus and R.
as.vector.trellis Convert a two-dimensional trellis object into a
one-dimensional trellis object. Change the
order of panels in a trellis object.
axis.i2wt specialized axis function for interaction2wt.
bivariateNormal Plot the bivariate normal density using
wireframe for specified rho.
case case statistics for regression analysis
ci.plot Plot confidence and prediction intervals for
simple linear regression
col.hh Initializing Trellis Displays
col3x2 col3x2 color dataset
combineLimits.trellisvector
Combine limits on a one-dimensional trellis
object.
cp.calc Rearranges and improves the legibility of the
output from the stepwise function in S-Plus.
cplx Generate a sequence spanning the xlim of a
lattice window.
datasets Datasets for Statistical Analysis and Data
Display, Heiberger and Holland
dchisq.intermediate Intermediate f and chisq functions to simplify
writing for both R and S-Plus.
diag.maybe.null Returns a value for the diagonal of NA and NULL
arguments.
diagQQ QQ plot of regression residuals.
diagplot5new Transpose of ECDF for centered fitted values
and residuals from a linear model.
do.formula.trellis.xysplom
Interprets model formulas for xysplom and
extended bwplots
emptyMainLeftAxisLeftStripBottomLegend
Remove main title, left axis tick labels, left
strip, bottom legend from plot and keep the
vertical spacing allocated to those items.
export.eps Exports a graph to an EPS file.
glhtWithMCP.993 Retain averaging behavior that was previously
available in glht.
gof.calculation Calculate Box-Ljung Goodness of Fit for ARIMA
models in S-Plus.
grid.yaxis.hh make x- and y-axis labels
hhpdf R tools for writing HH2: hhpdf, hhdev.off,
hhcapture, hhcode, hhpng, hhlatex
hov Homogeneity of Variance
hovBF Homogeneity of Variance: Brown-Forsyth method
hovPlot Homogeneity of Variance Plot
if.R Conditional Execution for R or S-Plus
interaction.positioned
interaction method for positioned factors.
interaction2wt Plot all main effects and twoway interactions
in a multifactor design
interval Prediction and Confidence Intervals for glm
Objects
intxplot Interaction plot, with an option to print
standard error bars.
ladder Draw a "ladder of powers" plot, plotting each
of several powers of y against the same powers
of x.
latex.array Generate the latex code for an '"array"' or
'"table"' with 3, 4, or more dimensions.
latticeresids Subroutine used by residual.plots.lattice
legendGrob2wt place separate keys to the left of each row of
a trellis
likert Diverging stacked barcharts for Likert,
semantic differential, rating scale data, and
population pyramids.
likertColor Selection of colors for Likert plots.
likertMosaic Diverging stacked barcharts for Likert,
semantic differential, rating scale data, and
population pyramids based on mosaic as the
plotting style.
likertWeighted Special case wrapper for likert() when multiple
columns are to have the same bar thicknesses.
Uses formula with one or two conditioning
variables.
lm.regsubsets Evaluate lm model with highest adjusted $R^2$.
lmatPairwise lmatPairwise
lmatRows Find the row numbers in the lmat corresponding
to the focus factor.
lmplot Four types of residual plots for linear models.
logit Logistic and odds functions and their inverses.
matrix.trellis Convert a one-dimensional trellis object to a
two-dimensional trellis object. This permits
combineLimits and useOuterStrips to work.
mcalinfct MCA multiple comparisons analysis (pairwise)
mmc MMC (Mean-mean Multiple Comparisons) plots.
mmc.mean MMC (Mean-mean Multiple Comparisons) plots from
the sufficient statistics for a one-way design.
mmcAspect Control aspect ratio in MMC plots to maintain
isomeans grid as a square.
mmcPruneIsomeans MMC plots in lattice-suppress isomeans grid
lines for specified levels of the factor.
mmcisomeans Functions used by mmcplot.
mmcplot MMC (Mean-mean Multiple Comparisons) plots in
lattice.
multicomp.order Update a multicomp object by ordering its
contrasts.
multicomp.reverse Force all comparisons in a "multicomp" object
to have the same sign.
norm.curve plot a normal or a t-curve with both x and z
axes.
normalApproxBinomial Plots to illustrate Normal Approximation to the
Binomial-hypothesis tests or confidence
intervals.
npar.arma Count the number of parameters in an ARIMA
model specification.
objip loop through all attached directories looking
for pattern, possibly restricting to specified
class or mode.
orthog.complete Construct an orthogonal matrix which is an
arbitrary completion of the column space of the
input set of columns.
panel.acf Panel functions for tsdiagplot.
panel.axis.right Right-justify right-axis tick labels.
panel.bwplot.intermediate.hh
Panel functions for bwplot.
panel.bwplot.superpose
Panel function for bwplot that displays an
entire box in the colors coded by groups.
panel.bwplott Extension to S-Plus trellis to allow transposed
plots.
panel.cartesian trellis panel function, with labeled rows and
columns and without strip labels.
panel.ci.plot Default Panel Function for ci.plot
panel.confintMMC Confidence interval panel for MMC tiebreaker
plots, or confidence interval plot.
panel.dotplot.tb Dotplot with evenly spaced tiebreakers.
panel.interaction2wt Plot all main effects and twoway interactions
in a multifactor design
panel.isomeans isomeans grid for MMC plots.
panel.likert Panel functions for likert that include a
stackWidth argument
panel.pairs.hh Function based on S-Plus panel.pairs to add the
subpanel.scales and panel.cex arguments.
panel.xysplom panel method for xysplom.
partial.corr partial correlations
pdf.latex Construct a pdf file from a "latex" file. See
Hmisc::latex for concepts.
pdiscunif Discrete Uniform Distribution
perspPlane Helper functions for regr2.plot
plot.mmc.multicomp MMC (Mean-mean Multiple Comparisons) plot.
plot.multicomp Multiple comparisons plot that gives
independent user control over the appearance of
the significant and not significant
comparisons.
position Find or assign the implied position for
graphing the levels of a factor. A new class
"positioned", which inherits from "ordered" and
"factor", is defined.
positioned-class Class "positioned", extends "ordered" to
specify the position for graphing the levels of
a factor.
print.NormalAndTplot Print method for Normal and t plots from
NTplot.
print.TwoTrellisColumns5
Print two conformable trellis plots in adjacent
columns with user control of widths.
print.latticeresids Print a 'latticeresids' object.
print.tsdiagplot Print a "tsdiagplot" object.
push.vp.hh push and pop a grid viewport, turn clipping
off, change scale.
pyramidLikert Print a Likert plot as a Population Triangle
rbind.trellis Extend matrix reshaping functions to trellis
objects.
regr1.plot plot x and y, with optional straight line fit
and display of squared residuals
regr2.plot 3D plot of z against x and y, with regression
plane fit and display of squared residuals.
regrresidplot Draw a plot of y vs x from a linear model
object, with residuals indicated by lines or
squares.
resid.squares plot squared residuals in inches to match the
y-dimension
residVSfitted Draw plots of resid ~ y.hat and
sqrt(abs(resid)) ~ y.hat
residual.plots Residual plots for a linear model.
residual.plots.lattice
Construct four sets of regression plots: Y
against X, residuals against X, partial
residuals against X, partial residuals against
each X adjusted for all the other X columns.
rowPcts Row and columns percents
seqplot Time series plot.
seqplotForecast seqplot with confidence bands for the forecast
region.
strip.background0 Turn off the coloring in the trellis strip
labels. Color 0 is the background color.
strip.useOuterStrips.first
Functions based on strip.default for use with
the useOuterScales function.
strip.xysplom strip function that is able to place the
correlation or regression coefficient into the
strip label.
sufficient Calculates the mean, standard deviation, and
number of observations in each group of a
data.frame that has one continuous variable and
two factors.
summary.arma.loop summary and print and subscript methods for
tsdiagplot and related objects.
toCQxR Reshape a 3-way array to a 2-way data.frame
that can can be used with a trellis
conditioning formula to get the three-way
behavior. Used with likertWeighted().
tsacfplots Coordinated time series and ACF and PCF plots.
tsdiagplot Times series diagnostic plots for a structured
set of ARIMA models.
useOuterScales Put scales for axes only on the bottom and left
panels of a lattice display, and give fine
control over the placement of strips
useOuterStripsT2L1 Three-factor generalization of
latticeExtra::useOuterStrips
vif Calculate the Variance Inflation Factor
xysplom scatterplot matrix with potentially different
sets of variables on the rows and columns.
z.test Z test for known population standard deviation
data display, scatterplot matrix, (MMC Mean–mean Multiple Comparison) plots, interaction plots, ANCOVA plots, regression diagnostics, time series, ARIMA models, boxplots
Author(s)
Richard M. Heiberger
Maintainer: Richard M. Heiberger <rmh@temple.edu>
References
Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R. Second Edition. Springer-Verlag, New York. https://link.springer.com/book/10.1007/978-1-4939-2122-5
Heiberger, Richard M. and Holland, Burt (2004). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS, First Edition. Springer Texts in Statistics. Springer. https://link.springer.com/book/10.1007/978-1-4757-4284-8.
See Also
ancovaplot,
ci.plot,
interaction2wt,
ladder,
case.lm,
NTplot for Normal and t plots,
hov,
resid.squares,
MMC,
AEdotplot,
likert,
tsacfplots,
tsdiagplot
demo(package="HH")
Examples
## In addition to the examples for each function,
## there are seven interactive shiny apps in the HH package:
## Not run:
if (interactive()) NTplot(mean0=0, mean1=1, shiny=TRUE)
if (interactive()) shiny::runApp(system.file("shiny/bivariateNormal", package="HH"))
if (interactive()) shiny::runApp(system.file("shiny/bivariateNormalScatterplot", package="HH"))
if (interactive()) shiny::runApp(system.file("shiny/PopulationPyramid", package="HH"))
if (interactive()) shiny.CIplot(height = "auto")
if (interactive()) shiny::runApp(system.file("shiny/AEdotplot", package="HH"))
if (interactive()) shiny::runApp(system.file("shiny/likert", package="HH"))
## End(Not run)