Skip to content

ARM Models Sorted by Type

Peter Li edited this page Aug 11, 2014 · 2 revisions

Below are the types of regression models that have been categorized and coded in Stan from ARM:

Single Level Models


Multi-Level Models



Single-Level Models

Linear Models

No Predictors

lm (y ~ 1)

One Predictor

  • earnings: linear model with one predictor
lm (earnings ~ height)
  • earnings: linear model with one predictor and natural log transformation
lm (log_earnings ~ height)
  • earnings: linear model with one predictor and log10 transformation
lm (log10_earnings ~ height)
  • electric: linear model with one predictor
lm (post_test ~ treatment)
  • grades: linear model with one predictor
lm (final ~ midterm)
  • kid_iq: linear model with one predictor
lm (kid_score ~ mom_hs)
  • kid_iq: linear model with one predictor
lm (kid_score ~ mom_iq)
lm (y ~ x)
  • sesame: linear model with one predictor
lm (watched ~ encouraged)
  • sesame: linear model with one predictor
lm (y ~ encouraged)
  • sesame: linear model with one predictor
lm (y ~ watched_hat)
lm (y ~ y_lag)
  • weight: centered linear model
lm (y ~ c_height + 1)

Multiple Predictors with No Interaction

  • congress: linear model with two predictors
lm (vote_88 ~ vote_86 + incumbency_88)
  • earnings: linear model with two predictors and natural log transformation
lm (log_earnings ~ height + male)
  • earnings: linear model with two predictors and log log transformation
lm (log_earnings ~ log_height + male)
  • earnings: linear model with two predictors and log transformation
lm (log_earn ~ height + male, subset=earn>0)
  • earnings2: mlinear model with eleven predictors
lm (earnings ~ interest + male + over65 + white + immig + educ_r + workmos + workhrs_top + any_ssi 
               + any_welfare + any_charity)
  • earnings: linear model with ten predictors
lm (earnings ~ male + over65 + white + immig + educ_r + workmos + workhrs_top + any_ssi + any_welfare 
               + any_charity)
lm (earnings ~ male + over65 + white + immig + educ_r + any_ssi + any_welfare + any_charity)
  • electric: linear model with two predictors
lm (post_test ~ pre_test + treatment)
  • ideo: linear model with two predictors
lm (score1 ~ party + x, subset=overlap)
  • ideo: linear model with two predictors
lm (score1 ~ party + x, subset=incs)
  • ideo: linear model with two predictors and reparamaterization
lm (score1 ~ party + I(z*(party==0)) + I(z*(party==1)), subset=incs)
  • kid_iq: linear model with two predictors
lm (kid_score ~ mom_hs + mom_iq)
  • kid_iq: linear model with two predictors
lm (ppvt ~ hs + afqt)
  • kid_iq: linear model with one factor
lm (kid_score ~ as.factor(mom_work))
  • mesquite: linear model with six predictors
lm (weight~ diam1 + diam2 + canopy_height + total_height + density + group)
  • mesquite: linear model with six predictors and log transformation
lm (log_weight~ log_diam1 + log_diam2 + log_canopy_height + log_total_height + log_density + group)
  • nes: linear model with eight predictors
lm (partyid7 ~ real_ideo + race_adj + age30_44 + age45_64 + age65up + educ1 + gender + income)
  • sesame: linear model with three predictors and one factor
lm (watched ~ encouraged + pretest + as.factor(site) + setting)
  • sesame: linear model with three predictors and one factor
lm (y ~ watched_hat + pretest + as.factor(site) + setting)
  • finite_populations: linear model with appropriate calculations for calculating the standard deviation of a finite population
lm (g ~ u_1 + u)

Multiple Predictors with Interaction

  • earnings: linear model with two predictors and interaction and natural log transformation
lm (log_earnings ~ height + male + height:male)
  • earnings: linear model with two predictors and interaction and natural log transformation centered using z-score
lm (log_earnings ~ z_height + male + z_height:male)
  • electric: linear model with two predictors and interaction
lm (post_test ~ pre_test + treatment + pre_test:treatment)
  • ideo: linear model with two predictors and interaction
lm (score1 ~ party + x + party:x, subset=incs)
  • kid_iq: linear model with two predictors and interaction
lm (kid_score ~ mom_hs + mom_iq + mom_hs:mom_iq)
  • kid_iq: 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)
  • kid_iq: 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)
  • kid_iq: 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)
  • mesquite: linear model with one transformed predictor and log transformation
lm (log_weight ~ log_canopy_volume)
  • mesquite: 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: linear model with one predictor and two transformed predictors and log transformation
lm (log_weight ~ log_canopy_volume + log_canopy_area + group)
  • mesquite: 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)

Logit Regression Models

One Predictor

  • nes: generalized linear model with logit link function and one predictor
glm (vote ~ income, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and one predictor
glm (switc ~ dist, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and one predictor
glm (switc ~ dist100, family=binomial(link="logit"))

Multiple Predictors with No Interaction

  • earnings: generalized linear model with logit link function and two predictors
glm (earn_pos ~ height + male, family=binomial(link="logit"))
  • earnings_pt1: logistic regression model with eight predictors
glm (earnings ~ male + over65 + white + immig + educ_r + any_ssi + any_welfare + any_charity,
     family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and three predictors
glm (switc ~ dist100 + arsenic + educ4, family=binomial(link="logit"))

Multiple Predictors with Interaction

  • wells: generalized linear model with logit link function and two predictors and interaction
glm (switc ~ dist100 + arsenic + dist100:arsenic, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function with two predictors and interaction centered using mean
glm (switc ~ c_dist100 + c_arsenic + c_dist100:c_arsenic, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and four predictors and interaction centered using mean
glm (switc ~ c_dist100 + c_arsenic + c_dist100:c_arsenic + assoc + educ4, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and three predictors and interaction centered using mean
glm (switc ~ c_dist100 + c_arsenic + c_dist100:c_arsenic + educ4, family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and 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: generalized linear model with logit link function with three predictors and interaction with log transform and centered using mean
glm (switc ~ 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: generalized linear model with logit link function with three predictors and interaction with log transform and centered using mean
glm (switc ~ dist100 + log_arsenic + educ4 + dist100:log_arsenic + dist100:educ4 + log_arsenic:educ4, 
     family=binomial(link="logit"))
  • wells: generalized linear model with logit link function and three predictors with interaction
glm (switc ~ dist100 + arsenic + educ4 + dist100:arsenic, family=binomial(link="logit"))

Other Generalized Linear Regression Models

Poisson

  • roaches: poisson regression model with exposure and three predictors
glm (y ~ roach1 + treatment + senior, family=poisson, offset=log(exposure2))

Probit

  • wells: generalized linear model with probit link function and one predictor
glm (switc ~ dist100, family=binomial(link="probit"))

Quasipoisson

glm(y ~ roach1 + treatment + senior, family=quasipoisson, offset=log(exposure2))

Multi-Level Models

Linear Models

Varying Intercept

  • 8_schools: multi-level linear model with redundant parameterization

  • electric_1b: multi-level linear model with varying intercept and slope

lmer (y ~ treatment + pre_test + (1 | pair))
  • electric: multi-level linear model with varying intercept
lmer (y ~ treatment + (1 | pair))
lmer (y ~ 1 + (1 | county))
lmer (y ~ x + (1 | county))
  • radon_group: multi-level linear model with group level predictor and individual level predictors
lmer (y ~ x + u + (1 | county))
  • radon_redundant: multi-level liner model with varying intercept and redundant parameterization
lmer (y ~ 1 + (1 | county))
lmer (y ~ x + (1 | county))
lmer (y ~ x + (1 | county))
  • anova_radon_nopred: multi-level linear model with varying intercept and set up for ANOVA
lmer (y ~ 1 + (1 | county))
lmer (y ~ u + x + (1 | county))
lmer (y ~ u + x + x_mean + (1 | county))
lmer (y ~ u + (1 | county))
lmer (y ~ theta + (theta | j))

Varying Intercept and Slope

lmer (y ~ x (1 + x | ethn))
  • electric_1a: multi-level linear model with varying intercept and slope
lmer (y ~ 1 + (1 | pair) + (treatment | grade))
  • hiv: multi-level linear model with varying slope and intercept
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)
  • radon_vary_si: multi-level linear model with group level predictors
lmer (y ~ 1 + (1 + x | county))
lmer (y ~ x + u.full + x:u.full + (1 + x | county))
  • r_sqr: multi-level linear model with appropriate calculations for R^2
lmer (y ~ 1 + (1 + x | county))

Multiple Group-Level Factors

lmer (y ~ x.centered + (1 + x.centered | eth) + (1 + x.centered | age) + (1 + x.centered | eth:age))
  • electric_1c: multi-level linear model with group level factors
lmer (y ~ 1 + (1 | pair) + (treatment | grade) + (pre_test | grade))
  • pilots: non-nested multi-level linear model with group level predictors
lmer (y ~ 1 + (1 | group.id) + (1 | scenario.id))
  • pilots: multi-level linear model with varying intercept and redundant parameterization
lmer (y ~ 1 + (1 | treatment) + (1 | airport))
  • pilots_expansion: multi-level linear model with varying intercept and parameter expansion
lmer (y ~ 1 + (1 | treatment) + (1 | airport))

Other

Logistic Regression Models

Varying Intercept

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

Multiple Group-Level Factors

glmer (y ~ black + female + black:female + v.prev.full + (1 | age) + (1 | edu) + (1 | age.edu) 
          + (1 | state) + (1 | region.full), family=binomial(link="logit"))
  • election88: multi-level logistic regression model with redundant parameterization
glmer (y ~ female + black + female:black + (1 | age) + (1 | edu) + (1 | age_edu) + (1 | state), 
      family=binomial(link="logit"))
glmer (y ~ female + black + female:black + (1 | age) + (1 | edu) + (1 | age_edu) + (1 | state), 
      family=binomial(link="logit"))
  • item_response: multi-level logistic regression model with parameter expansion
glmer (y ~ a:g + (a:g | k,j) + (g:b | k), family=binomial(link="logit"))

Other Generalized Linear Regression Models

Bernoulli

  • dogs_log: multi-level model using binomial distribution

  • dogs_check: multi-level model using binomial distribution

Categorical

Multivariate Normal

Poisson

Robit