Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (36 sloc) 1.31 KB
Data
====
1. election88.data.R
- N : number of observations
- n_age : number of age groups
- n_edu : number of edu groups
- n_age_edu : number of age-edu groups
- n_state : number of states
- n_region_full: number of regions
- age : age category
- age_edu : age-edu value
- black : is black? 1: Yes, 0: No
- edu : education level
- female : is female? 1: Yes, 0: No
- region_full : region number
- state : state number
- v_prev_full : preview values
- y : vote outcome
2. pilots.data.R
- N : number of observations
- n_groups : number of groups
- n_scenarios: number of scenarios
- group_id : group id
- scenario_id: scenario id
- y : score
Models
======
1. Multilevel model with varying intercept
election88.stan: glmer(y ~ black + female + (1 | state), family=binomial(link="logit"))
2. Multilevel model with several group level predictors
election88_full.stan: glmer(y ~ black + female + v_prev_full + (1 | age) + (1 | age_edu)
+ (1 | state) + (1 | region_full),
family=binomial(link="logit"))
pilots.stan : lmer(y ~ 1 + (1 | group) + (1 | scenario))
3. Above models with Matt trick
pilots_chr.stan: lmer(y ~1 + (1 | group) + (1 | scenario))