next up previous
Next: Example 2: 2004 pid, Up: Programs for data from Previous: Example 0mult: 2004, 2000,

Example 1: 2004 pid, libcon, watchtv; make tables; send raw data

year 2004
sendraw

VARS
  VCF0301
  VCF0724
  VCF0803
;

# one-way frequency tables (always important to examine these)
xtable VCF0301
xtable VCF0724
xtable VCF0803

# get rid of unwanted value in party ID
pid <- VCF0301;
pid <- ifelse(pid == 9, NA, pid);

# get rid of unwanted value in libcon self-placement
libcon <- VCF0803;
libcon <- ifelse(libcon == 9, NA, libcon);

# watchtv is how much watched campaign on TV: no (1), yes (2)
watchtv <- VCF0724;

# one-way frequency tables
xtable pid
xtable libcon
xtable watchtv

# crosstab of libcon given pid
xtable libcon pid

# crosstab of libcon given pid and watchtv
xtable libcon pid watchtv


Walter Mebane 2005-11-03