Learn R Programming

vcd (version 0.1-3.5)

PreSex: Pre-marital Sex and Divorce

Description

Data from Thornes & Collard (1979), reported in Gilbert (1981), on pre- and extra-marital sex and divorce.

Usage

data(PreSex)

Arguments

format

A 4-dimensional array resulting from cross-tabulating 1036 observations on 4 variables. The variables and their levels are as follows:

rll{ No Name Levels 1 MaritalStatus Divorced, Married 2 ExtramaritalSex Yes, No 3 PremaritalSex Yes, No 4 Gender Women, Men }

source

Michael Friendly (2000), Visualizing Categorical Data: http://hotspur.psych.yorku.ca/ftp/sas/vcd/catdata/marital.sas

References

G. N. Gilbert (1981), Modelling Society: An Introduction to Loglinear Analysis for Social Researchers. Allen and Unwin, London.

B. Thornes & J. Collard (1979), Who Divorces?. Routledge & Kegan, London.

M. Friendly (2000), Visualizing Categorical Data. SAS Institute, Cary, NC.

Examples

Run this code
data(PreSex)

par(mfrow=c(1,2))
## Mosaic display for Gender and Premarital Sexual Expirience
## (Gender Pre)
mosaicplot(margin.table(PreSex,c(3,4)), shade = TRUE,
           clegend = FALSE, main = "Gender and Premarital Sex")
## (Gender Pre)(Extra)
mosaicplot(margin.table(PreSex,c(2,3,4)), shade = TRUE, clegend = FALSE,
           margin = ~Gender*PremaritalSex + ExtramaritalSex ,
	   main = "PreMaritalSex*Gender +Sex")
par(mfrow=c(1,1))

## (Gender Pre Extra)(Marital)
mosaicplot(PreSex, shade = TRUE, margin = ~Gender*PremaritalSex*ExtramaritalSex + MaritalStatus,
           clegend = FALSE, main = "PreMarital*ExtraMarital + MaritalStatus")

## (GPE)(PEM)
mosaicplot(PreSex, shade = TRUE,
           margin = ~Gender*PremaritalSex*ExtramaritalSex + MaritalStatus*PremaritalSex*ExtramaritalSex,
	   clegend = FALSE, main = "G*P*E + P*E*M")

Run the code above in your browser using DataLab