Learn R Programming

⚠️There's a newer version (0.8-5) of this package.Take me there.

vcdExtra

Extensions and additions to vcd: Visualizing Categorical Data

Version 0.7-6

This package provides additional data sets, documentation, and a few functions designed to extend the vcd package for Visualizing Categorical Data and the gnm package for Generalized Nonlinear Models. In particular, vcdExtra extends mosaic, assoc and sieve plots from vcd to handle glm() and gnm() models and adds a 3D version in mosaic3d().

vcdExtra is now a support package for the book Discrete Data Analysis with R by Michael Friendly and David Meyer.

Details

The main purpose of this package is to serve as a sandbox for introducing extensions of mosaic plots and related graphical methods that apply to loglinear models fitted using glm() and related, generalized nonlinear models fitted with gnm() in the gnm package. A related purpose is to fill in some holes in the analysis of categorical data in R, not provided in base R, vcd, or other commonly used packages.

  • The method mosaic.glm()

extends the mosaic.loglm() method in the vcd package to this wider class of models. This method also works for the generalized nonlinear models fit with the gnm package, including models for square tables and models with multiplicative associations.

  • mosaic3d()

introduces a 3D generalization of mosaic displays using the rgl package.

  • A new class, glmlist, is introduced for working with

collections of glm objects, e.g., Kway() for fitting all K-way models from a basic marginal model, and LRstats() for brief statistical summaries of goodness-of-fit for a collection of models.

  • For square tables with ordered factors, Crossings() supplements the

specification of terms in model formulas using Symm(), Diag(), Topo(), etc. in the gnm package.

  • In addition, there are many new data sets, a tutorial vignette,

Working with categorical data with R and the vcd package, vignette("vcd-tutorial", package = "vcdExtra"), and a few useful utility functions for manipulating categorical data sets and working with models for categorical data.

Installation

Get the released version from CRAN:

 install.packages("vcdExtra")

The development version can be installed to your R library directly from this repo via:

 if (!require(remotes)) install.packages("remotes")
 remotes::install_github("friendly/vcdExtra")

Copy Link

Version

Install

install.packages('vcdExtra')

Monthly Downloads

4,531

Version

0.7-6

License

GPL (>= 2)

Maintainer

Michael Friendly

Last Published

February 14th, 2022

Functions in vcdExtra (0.7-6)

Abortion

Abortion Opinion Data
Vietnam

Student Opinion about the Vietnam War
Vote1980

Race and Politics in the 1980 Presidential Vote
cutfac

Cut a Numeric Variable to a Factor
datasets

Information on Data Sets in Packages
Dyke

Sources of Knowledge of Cancer
split3d

Subdivide a 3D Object
Fungicide

Carcinogenic Effects of a Fungicide
seq_mosaic

Sequential Mosaics and Strucplots for an N-way Table
GKgamma

Calculate Goodman-Kruskal Gamma for ordered tables
Cancer

Survival of Breast Cancer Patients
DaytonSurvey

Dayton Student Survey on Substance Use
Cormorants

Advertising Behavior by Males Cormorants
Depends

Dependencies of R Packages
Geissler

Geissler's Data on the Human Sex Ratio
GSS

General Social Survey-- Sex and Party affiliation
Mice

Mice Depletion Data
Mobility

Social Mobility data
HospVisits

Hospital Visits Data
WorkerSat

Worker Satisfaction Data
Yamaguchi87

Occupational Mobility in Three Countries
Bartlett

Bartlett data on plum root cuttings
Gilby

Clothing and Intelligence Rating of Children
Hoyt

Minnesota High School Graduates
Burt

Burt (1950) Data on Hair, Eyes, Head and Stature
Draft1970

USA 1970 Draft Lottery Data
Draft1970table

USA 1970 Draft Lottery Table
Summarise

Brief Summary of Model Fit for glm and loglm Models
Glass

British Social Mobility from Glass(1954)
TV

TV Viewing Data
expand.dft

Expand a frequency table to case form
glmlist

Create a Model List Object
HLtest

Hosmer-Lemeshow Goodness of Fit Test
mosaic3d

3D Mosaic Plots
mosaic.glmlist

Mosaic Displays for glmlist and logllmlist Objects
Mammograms

Mammogram Ratings
Mental

Mental impairment and parents SES
blogits

Bivariate Logits and Log Odds Ratio
collapse.table

Collapse Levels of a Table
modFit

Brief Summary of Model Fit for a glm or loglm Object
Titanicp

Passengers on the Titanic
mosaic.glm

Mosaic plots for fitted generalized linear and generalized nonlinear models
vcdExtra-package

Extensions and additions to vcd: Visualizing Categorical Data
zero.test

Score test for zero inflation in Poisson data
Toxaemia

Toxaemia Symptoms in Pregnancy
CMHtest

Generalized Cochran-Mantel-Haenszel Tests
AirCrash

Air Crash Data
Caesar

Risk Factors for Infection in Caesarian Births
ICU

ICU data set
Heart

Sex, Occupation and Heart Disease
Heckman

Labour Force Participation of Married Women 1967-1971
Alligator

Alligator Food Choice
Crossings

Crossings Interaction of Factors
JobSat

Cross-classification of job satisfaction by income
CyclingDeaths

London Cycling Deaths
loglin-utilities

Loglinear Model Utilities
logLik.loglm

Log-Likelihood of a loglm Object
Hauser79

Hauser (1979) Data on Social Mobility
Kway

Fit All K-way Models in a GLM
HairEyePlace

Hair Color and Eye Color in Caithness and Aberdeen
logseries

The Logarithmic Series Distribution
mcaplot

Simple and enhanced plot of MCA solutions
PhdPubs

Publications of PhD Candidates
LRstats

Brief Summary of Model Fit for glm and loglm Models
print.Kappa

Print Kappa
ShakeWords

Shakespeare's Word Type Frequencies
seq_loglm

Sequential Loglinear Models for an N-way Table
update.xtabs

Update method for a xtabs object
vcdExtra-deprecated

Deprecated Functions in vcdExtra Package
Detergent

Detergent preference data
Donner

Survival in the Donner Party
Accident

Traffic Accident Victims in France in 1958