data(Employment)
## Employment Status ##
mosaicplot(Employment, shade = TRUE,
margin = ~ LayoffCause*EmploymentLength + EmploymentStatus,
main = "Layoff*EmployLength + EmployStatus")
mosaicplot(Employment, shade = TRUE,
margin = ~ LayoffCause*EmploymentLength + LayoffCause*EmploymentStatus,
main = "Layoff*EmployLength + Layoff*EmployStatus")
par(mfrow=c(1,2))
## Closure ##
mosaicplot(Employment[,,1], shade = TRUE, main = "Layoff: Closure")
## Replaced ##
mosaicplot(Employment[,,2], shade = TRUE, main = "Layoff : Replaced")
par(mfrow=c(1,1))
Run the code above in your browser using DataLab