Famine Code 2

This do-file creates Table 1 (p. 60) in the SSR paper.

// Task: descriptive analysis; 2005 cgss; rural sample
// Project: Chinese Famine & Self-rated Health

**********************************************************************
*** 0. Program setup
**********************************************************************

version 13.0
clear all
macro drop _all
set linesize 80
set more off

**********************************************************************
*** 1. Identify sample
**********************************************************************
*********************************
*** 1.1. open data
*********************************

use "2014-02-24_clean10a_SocScienceRes_58notinfamine", clear

*********************************
*** 1.2. sample
*********************************

keep if rural_newfm == 1 & fmparty < .
drop if rural_b1f  == 0 | rural_b1m == 0
count
/* n = 1716*/

**********************************************************************
*** 2. EDR and health
**********************************************************************

tab edr1, m

// health factor analysis & reliability
factor FH1 FH2 FH3 FH4 FH5 FH6 FH7 FH8
alpha FH1 FH2 FH3 FH4 FH5 FH6 FH7 FH8

**********************************************************************
*** 3. Descriptives
**********************************************************************

tab1 cohort male pre famine post FH1-FH lninc edu edr1 fmparty age, m
tabstat FH FH1-FH8 edu lninc edr1 fmparty age, by(male) stat(mean sd count) long nototal format(%9.2f)

tabstat FH FH1-FH8 edu lninc fmparty age if cohort == 1, by(male) stat(mean sd count) long nototal format(%9.2f)
tabstat FH FH1-FH8 edu lninc fmparty age if cohort == 2, by(male) stat(mean sd count) long nototal format(%9.2f)
tabstat FH FH1-FH8 edu lninc fmparty age if cohort == 3, by(male) stat(mean sd count) long nototal format(%9.2f)

foreach var of varlist FH FH1-FH8 edu lninc fmparty age {
  display "variable == `var'"
  ttest `var', by(male)
}

foreach c of varlist pre famine post {
  foreach v of varlist FH FH1-FH8 edu lninc fmparty age {
    display "cohort = `c'; variable = `v'"
    ttest `v' if `c' == 1, by(male)
  }
}

foreach v of varlist FH FH1-FH8 edu lninc fmparty age {
  display "==> `v'"
  anova `v' cohort
}

Associate Professor, Department of Sociology, Boston College