15 Corporatism: Hierarchical model for economic growth

The following program implements a regression model of economic growth among 16 OECD countries, 1971-1984 (Western 1998, @AlvarezGarrettLange1991a).13 The model is hierarchical in that it specifies country-specific coefficients for the following predictors: lagged growth, demand, import price movements, export price movements, leftist government and an intercept. The magnitudes of the country-specific coefficients are conditional on (time-invariant) extent of labor organization within each country; these regression relationships constitute the second level of the model.

The data come from N=16 countries, and \(T=14\) years (1971:1984) with \(K=6\) covariates at the lowest (“micro”) level of the hierarchy, and \(J=2\) covariates (an intercept and the labor organization variable) at the second level.

  data {
  // number of observations
  int N;
  // response variable
  vector[N] y;
  // number of predictors in the regression
  int K;
  // design matrix of country-year obs
  matrix[N, K] X;
  // number of countries
  int n_country;
  // countries for each observation
  int country[N];
  // design matrix of country-variables
  int J;
  matrix[n_country, J] U;
  // priors
  // mean and scale of normal prior on beta
  vector[K] beta_mean;
  vector[K] beta_scale;
  // mean and scale of normal prior on gamma
  real gamma_mean;
  real gamma_scale;
  // scale for half-Cauchy prior on tau
  real tau_scale;
}
parameters {
  // obs. errors.
  real sigma;
  // country-specific terms
  vector[n_country] gamma;
  vector[J] delta;
  // regression coefficients
  vector[K] beta[n_country];
  // scale on country priors
  real tau;
}
transformed parameters {
  vector[N] mu;
  vector[n_country] alpha;
  alpha = gamma + U * delta;
  for (i in 1:N) {
    mu[i] = alpha[country[i]] + X[i] * beta[country[i]];
  }
}
model {
  gamma ~ normal(gamma_mean, gamma_scale);
  tau ~ cauchy(0., tau_scale);
  for (k in 1:K) {
    beta[k] ~ normal(beta_mean, beta_scale);
  }
  alpha ~ normal(gamma, tau);
  y ~ normal(mu, sigma);
}
generated quantities {
}

References

Western, Bruce. 1998. “Causal Heterogeneity in Comparative Research: A Bayesian Hierarchical Modelling Approach.” American Journal of Political Science 42 (4). [Midwest Political Science Association, Wiley]: 1233–59. https://doi.org/10.2307/2991856.