Ch.7
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Data
====
1. congress.data.R
- N : number of observations
- incumbency_88: indicator of whether the current occupant of the congressional seat
is running for reelection
+1: district is currently occupied by Democrat who is running for
reelection
0: election is open (neither of the two candidates is currently
occupying the seat)
-1: district is currently occupied by Republican who is running for
reelection
- vote_86 : democratic share of the two-party vote in 86 election
- vote_88 : democratic share of the two-party vote in 88 election
2. earnings.data.R
- N : number of observations
- earnings: earnings in dollars
- height : height in inches
- sex : 1: male, 2: female
3. earnings1.data.R
- N : number of observations
- earn_pos: is earnings positive? 1: Yes, 0: No
- height : height in inches
- male : is male? 1: Yes, 0: No
4. earnings2.data.R
- N : number of observations
- earnings: earnings in dollars
- height : height in inches
- sex : 1: male, 2: female
5. wells.data.R
- N : number of observations
- arsenic: level of arsenic of respondent's well
- assoc : any household members active in community organizations? 1: Yes, 0: No
- dist : distance (in meters) to closest known safe well
- educ : education level of head of household
- switc : household switched to new well? 1: Yes, 0: No
Models
======
1. One predictor
wells.stan: glm(switc ~ dist, family=binomial(link="logit"))
2. Multiple predictors with no interaction
congress.stan : lm(vote_88 ~ vote_86 + incumbency_88)
earnings1.stan: glm(earn_pos ~ height + male, family=binomial(link="logit"))
3. Log transformations
earnings_interaction.stan: lm(log(earnings) ~ height + male + height:male)
earnings2.stan : lm(log(earnings) ~ height + male)