PreSex                  package:vcd                  R Documentation

_P_r_e-_m_a_r_i_t_a_l _S_e_x _a_n_d _D_i_v_o_r_c_e

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     data(PreSex)

_F_o_r_m_a_t:

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

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

_S_o_u_r_c_e:

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

_R_e_f_e_r_e_n_c_e_s:

     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.

_E_x_a_m_p_l_e_s:

     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")

