Skip to content

ARM Models Sorted by Chapter

Dieter Menne edited this page May 7, 2015 · 6 revisions

Each chapter has a README file on github that you can view by clicking on the chapter link and scrolling down (past the files). The README file contains information about the data contained in the chapter (particularly, what each variable represents) and sorts the models in the chapter by type.

If there is a * next to a model name, then the model DOES NOT currently work with RStanARM. Furthermore, multilevel models are not currently supported by RStanARM, but all other models below (without a *) are supported.





  • 4.1 Linear Transformations

  • earn_height: linear model with one predictor
    lm (earnings ~ height)

  • 4.2 Centering & Standardizing

  • kidiq_interaction: linear model with two predictors and interaction
    lm (kid_score ~ mom_hs + mom_iq + mom_hs:mom_iq)

  • kidiq_interaction_c: linear model with two predictors and interaction centered using mean
    lm (kid_score ~ c_mom_hs + c_mom_iq + c_mom_hs:c_mom_iq)

  • kidiq_interaction_c2: linear model with two predictors and interaction centered using conventional points
    lm (kid_score ~ c2_mom_hs + c2_mom_iq + c2_mom_hs:c2_mom_iq)

  • kidiq_interaction_z: linear model with two predictors and interaction centered using z-score
    lm (kid_score ~ z_mom_hs + z_mom_iq + z_mom_hs:z_mom_iq)

  • 4.4 Log Transformations

  • logearn_height: linear model with one predictor and natural log transformation
    lm (log_earnings ~ height)

  • log10earn_height: linear model with one predictor and log10 transformation
    lm (log10_earnings ~ height)

  • logearn_height_male: linear model with two predictors and natural log transformation
    lm (log_earnings ~ height + male)

  • logearn_interaction: linear model with two predictors and interaction and natural log transformation
    lm (log_earnings ~ height + male + height:male)

  • logearn_interaction_z: linear model with two predictors and interaction and natural log transformation centered using z-score
    lm (log_earnings ~ z_height + male + z_height:male)

  • logearn_logheight: linear model with two predictors and log log transformation
    lm (log_earnings ~ log_height + male)

  • 4.5 Other Transformations

  • kidscore_momwork: linear model with one factor
    lm (kid_score ~ as.factor(mom_work))

  • 4.6 Regression Models for Prediction

  • mesquite: linear model with six predictors
    lm (weight~ diam1 + diam2 + canopy_height + total_height + density + group)

  • mesquite_log: linear model with six predictors and log transformation
    lm (log_weight~ log_diam1 + log_diam2 + log_canopy_height + log_total_height + log_density + group)

  • mesquite_volume: linear model with one transformed predictor and log transformation
    lm (log_weight ~ log_canopy_volume)

  • mesquite_vas: linear model with three predictors and three transformed predictors and log transformation
    lm (log_weight ~ log_canopy_volume + log_canopy_area + log_canopy_shape + log_total_height + log_density + group)

  • mesquite_va: linear model with one predictor and two transformed predictors and log transformation
    lm (log_weight ~ log_canopy_volume + log_canopy_area + group)

  • mesquite_vash: linear model with two predictors and three transformed predictors and log transformation lm (log_weight ~ log_canopy_volume + log_canopy_area + log_canopy_shape + log_total_height + group)

  • 4.7 Fitting a Series of Regressions - graph partially works

  • nes: linear model with eight predictors
    lm (partyid7 ~ real_ideo + race_adj + age30_44 + age45_64 + age65up + educ1 + gender + income)


  • 5.1 Logistic Regression with One Predictor

  • nes_logit: generalized linear model with logit link function and one predictor
    glm (vote ~ income, family=binomial(link="logit"))

  • 5.2 Interpreting Logistic Regression Coeficients

  • nes_logit: generalized linear model with logit link function and one predictor
    glm (vote ~ income, family=binomial(link="logit"))

  • 5.4 Logistic Regression Wells in Bangladesh

  • wells_dist: generalized linear model with logit link function and one predictor
    glm (switched ~ dist, family=binomial(link="logit"))

  • wells_dist100: generalized linear model with logit link function and one predictor
    glm (switched ~ dist100, family=binomial(link="logit"))

  • 5.5 Logistic Regression with Interactions

  • wells_interaction: generalized linear model with logit link function and two predictors and interaction
    glm (switched ~ dist100 + arsenic + dist100:arsenic, family=binomial(link="logit"))

  • wells_interaction_c: generalized linear model with logit link function with two predictors and interaction centered using mean
    glm (switched ~ c_dist100 + c_arsenic + c_dist100:c_arsenic, family=binomial(link="logit"))

  • wells_daae_c: generalized linear model with logit link function and four predictors and interaction centered using mean
    glm (switched ~ c_dist100 + c_arsenic + c_dist100:c_arsenic + assoc + educ4, family=binomial(link="logit"))

  • wells_dae_c: generalized linear model with logit link function and three predictors and interaction centered using mean
    glm (switched ~ c_dist100 + c_arsenic + c_dist100:c_arsenic + educ4, family=binomial(link="logit"))

  • wells_predicted: generalized linear model with logit link function and three predictors and interaction centered using mean
    glm (switched ~ c_dist100 + c_arsenic + c_educ4 + c_dist100:c_arsenic + c_dist100:c_educ4 + c_arsenic:c_educ4, family=binomial(link="logit"))

  • 5.6 Evaluating, Checking, & Comparing

  • wells_predicted: generalized linear model with logit link function with three predictors and interaction centered using mean
    glm (switc ~ c_dist100 + c_arsenic + c_educ4 + c_dist100:c_arsenic + c_dist100:c_educ4 + c_arsenic:c_educ4, family=binomial(link="logit"))

  • wells_predicted_log: generalized linear model with logit link function with three predictors and interaction with log transform and centered using mean
    glm (switched ~ c_dist100 + c_log_arsenic + c_educ4 + c_dist100:c_log_arsenic + c_dist100:c_educ4 + c_log_arsenic:c_educ4, family=binomial(link="logit"))

  • wells_predicted_log: generalized linear model with logit link function with three predictors and interaction with log transform and centered using mean
    glm (switched ~ c_dist100 + c_log_arsenic + c_educ4 + c_dist100:c_log_arsenic + c_dist100:c_educ4 + c_log_arsenic:c_educ4, family=binomial(link="logit"))

  • 5.7 Average Predictive Comparisons

  • wells_dae: generalized linear model with logit link function and three predictors
    glm (switched ~ dist100 + arsenic + educ4, family=binomial(link="logit"))

  • wells_dae_inter: generalized linear model with logit link function and three predictors with interaction
    glm (switched ~ dist100 + arsenic + educ4 + dist100:arsenic, family=binomial(link="logit"))

  • 5.8 Identifiability and Separating

  • separation: generalized linear model with logit link function and one predictor
    glm (y ~ x, family=binomial(link="logit"))









* [radon_inter_vary](https://github.com/stan-dev/example-models/blob/master/ARM/Ch.13/radon_inter_vary.stan): multi-level linear model with group level predictors         

lmer (y ~ x + u.full + x:u.full + (1 + x | county))

* [radon_inter_vary_chr](https://github.com/stan-dev/example-models/blob/master/ARM/Ch.13/radon_inter_vary_chr.stan): multi-level linear model with group level predictors using the Choo-Hoffman Parametrization        

lmer (y ~ x + u.full + x:u.full + (1 + x | county))

  • 13.4 Understanding Correlations Between Intercepts & Slopes

  • earnings_vary_si: multi-level linear model with group level predictors
    lmer (y ~ x (1 + x | ethn))

  • earnings_vary_si_chr: multi-level linear model with group level predictors using the Choo-Hoffman Parametrization
    lmer (y ~ x (1 + x | ethn))

  • 13.5 Non-Nested Models

  • pilots: non-nested multi-level linear model with group level predictors
    lmer (y ~ 1 + (1 | group.id) (1 | scenario.id))

  • pilots_chr: non-nested multi-level linear model with group level predictors using the Choo-Hoffman Parametrization
    lmer (y ~ 1 + (1 | group.id) (1 | scenario.id))

  • earnings_latin_square: non-nested multi-level linear model with group level predictors
    lmer (y ~ x.centered + (1 + x.centered | eth) + (1 + x.centered | age) + (1 + x.centered | eth:age))

  • earnings_latin_square_chr: non-nested multi-level linear model with group level predictors using the Choo-Hoffman Parametrization
    lmer (y ~ x.centered + (1 + x.centered | eth) + (1 + x.centered | age) + (1 + x.centered | eth:age))


  • 14.1 State-Level Opinions From National Polls

    • election88: multi-level logistic regression model with group level predictors
      lmer (y ~ black + female + (1 | state), family=binomial(link="logit"))

    • election88_full: multi-level logistic regression model with group level predictors
      lmer (y ~ black + female + black:female + v.prev.full + (1 | age) + (1 | edu) + (1 | age.edu) + (1 | state) + (1 | region.full), family=binomial(link="logit"))







  • 20.5 Multilevel Power Calculation Using Fake-Data Simulation

    • hiv: multi-level linear model with varying slope and intercept
      lmer (y ~ time + (1 + time | person)

    • hiv_chr: multi-level linear model with varying slope and intercept using the Choo-Hoffman Parametrization
      lmer (y ~ time + (1 + time | person)

    • hiv_inter: multi-level linear model with interaction and varying slope and intercept
      lmer (y ~ time:treatment + (1 + time | person)

    • hiv_inter_chr: multi-level linear model with interaction and varying slope and intercept using the Choo-Hoffman Parametrization
      lmer (y ~ time:treatment + (1 + time | person)




  • 23.1 Multilevel Aspects of Data Collection

    • electric_1a: multi-level linear model with varying intercept and slope
      lmer (y ~ 1 + (1 | pair) + (treatment | grade))

    • electric_1a_chr: multi-level linear model with varying intercept and slope using the Choo-Hoffman Parametrization
      lmer (y ~ 1 + (1 | pair) + (treatment | grade))

    • electric_1b: multi-level linear model with varying intercept and slope
      lmer (y ~ treatment + pre_test + (1 | pair))

    • electric_1b_chr: multi-level linear model with varying intercept and slope using the Choo-Hoffman Parametrization
      lmer (y ~ treatment + pre_test + (1 | pair))

    • electric_1c: multi-level linear model with group level factors
      lmer (y ~ 1 + (1 | pair) + (treatment | grade) + (pre_test | grade))

    • electric_1c_chr: multi-level linear model with group level factors using the Choo-Hoffman Parametrization
      lmer (y ~ 1 + (1 | pair) + (treatment | grade) + (pre_test | grade))

    • electric_one_pred: linear model with one predictor
      lm (post_test ~ treatment)

    • electric_multi_preds: linear model with two predictors
      lm (post_test ~ treatment + pre_test)

  • 23.3 Treatments Applied at Different Levels

    • electric: multi-level linear model with varying intercept
      lmer (y ~ treatment + (1 | pair))

    • electric_chr: multi-level linear model with varying intercept using the Choo-Hoffman Parametrization
      lmer (y ~ treatment + (1 | pair))

  • 23.4 Instrumental Variables & Multilevel Modeling



Clone this wiki locally