Next: Example 2: 2000 pid,
Up: Programs for data from
Previous: Example 0: 2000 pid,
year 2000
sendraw
VARS
CF0301
CF0724
CF0803
;
# one-way frequency tables (always important to examine these)
xtable CF0301
xtable CF0724
xtable CF0803
# get rid of unwanted value in party ID
pid <- CF0301;
pid <- ifelse(pid == 9, NA, pid);
# get rid of unwanted value in libcon self-placement
libcon <- CF0803;
libcon <- ifelse(libcon == 9, NA, libcon);
# watchtv is how much watched campaign on TV: no (1), yes (2)
watchtv <- CF0724;
# 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
2002-11-19