socsupport               package:DAAG               R Documentation

_S_o_c_i_a_l _S_u_p_p_o_r_t _D_a_t_a

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

     Data from a survey on social and other kinds of support.

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

     socsupport

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

     This data frame contains the following columns:

     _g_e_n_d_e_r a factor with levels 'female', 'male' 

     _a_g_e age, in years, with levels '18-20', '21-24', '25-30', 
          '31-40','40+' 

     _c_o_u_n_t_r_y a factor with levels 'australia',  'other' 

     _m_a_r_i_t_a_l a factor with levels 'married', 'other', 'single' 

     _l_i_v_e_w_i_t_h a factor with levels 'alone',  'friends', 'other',
          'parents',  'partner', 'residences'

     _e_m_p_l_o_y_m_e_n_t a factor with levels 'employed fulltime', 'employed
          part-time',  'govt assistance', 'other', 'parental support' 

     _f_i_r_s_t_y_r a factor with levels 'first year',  'other' 

     _e_n_r_o_l_m_e_n_t a factor with levels '', 'full-time', 'part-time'

     _e_m_o_t_i_o_n_a_l summary of 5 questions on emotional support availability

     _e_m_o_t_i_o_n_a_l_s_a_t summary of 5 questions on emotional support
          satisfaction

     _t_a_n_g_i_b_l_e summary of 4 questions on availability of tangible
          support

     _t_a_n_g_i_b_l_e_s_a_t summary of 4 questions on satisfaction with tangible
          support

     _a_f_f_e_c_t summary of 3 questions on availability of affectionate
          support sources

     _a_f_f_e_c_t_s_a_t summary of 3 questions on satisfaction with affectionate
          support sources

     _p_s_i summary of 3 questions on availability of positive social
          interaction

     _p_s_i_s_a_t summary of 3 questions on satisfaction with positive social
           interaction

     _e_s_u_p_p_o_r_t summary of 4 questions on extent of emotional support
          sources

     _p_s_u_p_p_o_r_t summary of 4 questions on extent of practical support
          sources

     _s_u_p_s_o_u_r_c_e_s summary of 4 questions on extent of social support 
          sources (formerly, socsupport)

     _B_D_I Score on the Beck depression index (summary of 21 questions)

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

     Melissa Manning, Psychology, Australian National University

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

     attach(socsupport)

     not.na <- apply(socsupport[,9:19], 1, function(x)!any(is.na(x)))
     ss.pr1 <- princomp(as.matrix(socsupport[not.na, 9:19]), cor=TRUE)  
     pairs(ss.pr1$scores[,1:3])
     sort(-ss.pr1$scores[,1])        # Minus the largest value appears first
     pause()

     not.na[36] <- FALSE
     ss.pr <- princomp(as.matrix(socsupport[not.na, 9:19]), cor=TRUE)  
     summary(ss.pr)          # Examine the contribution of the components
     pause()

     # We now regress BDI on the first six principal components:
     ss.lm <- lm(BDI[not.na] ~ ss.pr$scores[, 1:6], data=socsupport)
     summary(ss.lm)$coef
     pause()

     ss.pr$loadings[,1]
     plot(BDI[not.na] ~  ss.pr$scores[ ,1], col=as.numeric(gender), 
     pch=as.numeric(gender),  xlab ="1st principal component", ylab="BDI")
     topleft <- par()$usr[c(1,4)]
     legend(topleft[1], topleft[2], col=1:2, pch=1:2, legend=levels(gender))

