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-5

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 goodnes-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(devtools)) install.packages("devtools")
 library(devtools)
 install_github("friendly/vcdExtra")

Copy Link

Version

Install

install.packages('vcdExtra')

Monthly Downloads

3,497

Version

0.7-5

License

GPL (>= 2)

Maintainer

Michael Friendly

Last Published

January 25th, 2021

Functions in vcdExtra (0.7-5)

Caesar

Risk Factors for Infection in Caesarian Births
Glass

British Social Mobility from Glass(1954)
HLtest

Hosmer-Lemeshow Goodness of Fit Test
DaytonSurvey

Dayton Student Survey on Substance Use
Draft1970

USA 1970 Draft Lottery Data
CMHtest

Generalized Cochran-Mantel-Haenszel Tests
LRstats

Brief Summary of Model Fit for glm and loglm Models
Depends

Dependencies of R Packages
Kway

Fit All K-way Models in a GLM
HairEyePlace

Hair Color and Eye Color in Caithness and Aberdeen
Draft1970table

USA 1970 Draft Lottery Table
Crossings

Crossings Interaction of Factors
Donner

Survival in the Donner Party
Detergent

Detergent preference data
GKgamma

Calculate Goodman-Kruskal Gamma for ordered tables
CyclingDeaths

London Cycling Deaths
JobSat

Cross-classification of job satisfaction by income
AirCrash

Air Crash Data
Alligator

Alligator Food Choice
Hauser79

Hauser (1979) Data on Social Mobility
Vietnam

Student Opinion about the Vietnam War
Summarise

Brief Summary of Model Fit for glm and loglm Models
GSS

General Social Survey-- Sex and Party affiliation
ICU

ICU data set
TV

TV Viewing Data
Bartlett

Bartlett data on plum root cuttings
Heart

Sex, Occupation and Heart Disease
Geissler

Geissler's Data on the Human Sex Ratio
Dyke

Sources of Knowledge of Cancer
update.xtabs

Update method for a xtabs object
cutfac

Cut a Numeric Variable to a Factor
Mental

Mental impariment and parents SES
logseries

The Logarithmic Series Distribution
mcaplot

Simple and enhanced plot of MCA solutions
Mammograms

Mammogram Ratings
WorkerSat

Worker Satisfaction Data
zero.test

Score test for zero inflation in Poisson data
Burt

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

Minnesota High School Graduates
HospVisits

Hospital Visits Data
Fungicide

Carcinogenic Effects of a Fungicide
Vote1980

Race and Politics in the 1980 Presidential Vote
seq_loglm

Sequential Loglinear Models for an N-way Table
datasets

Information on Data Sets in Packages
vcdExtra-deprecated

Deprecated Functions in vcdExtra Package
print.Kappa

Print Kappa
seq_mosaic

Sequential Mosaics and Strucplots for an N-way Table
loglin-utilities

Loglinear Model Utilities
split3d

Subdivide a 3D Object
logLik.loglm

Log-Likelihood of a loglm Object
Gilby

Clothing and Intelligence Rating of Children
Yamaguchi87

Occupational Mobility in Three Countries
glmlist

Create a Model List Object
blogits

Bivariate Logits and Log Odds Ratio
vcdExtra-package

Extensions and additions to vcd: Visualizing Categorical Data
expand.dft

Expand a frequency table to case form
Heckman

Labour Force Participation of Married Women 1967-1971
PhdPubs

Publications of PhD Candidates
mosaic3d

3D Mosaic Plots
mosaic.glmlist

Mosaic Displays for glmlist and logllmlist Objects
Titanicp

Passengers on the Titanic
ShakeWords

Shakespeare's Word Type Frequencies
Toxaemia

Toxaemia Symptoms in Pregnancy
collapse.table

Collapse Levels of a Table
Mobility

Social Mobility data
Mice

Mice Depletion Data
modFit

Brief Summary of Model Fit for a glm or loglm Object
mosaic.glm

Mosaic plots for fitted generalized linear and generalized nonlinear models
Accident

Traffic Accident Victims in France in 1958
Abortion

Abortion Opinion Data
Cancer

Survival of Breast Cancer Patients
Cormorants

Advertising Behavior by Males Cormorants