// generated with brms 2.15.0
functions {
}
data {
  int<lower=1> N;  // total number of observations
  int Y[N];  // response variable
  int<lower=1> K;  // number of population-level effects
  matrix[N, K] X;  // population-level design matrix
  int prior_only;  // should the likelihood be ignored?
}
transformed data {
  int Kc = K - 1;
  matrix[N, Kc] Xc;  // centered version of X without an intercept
  vector[Kc] means_X;  // column means of X before centering
  for (i in 2:K) {
    means_X[i - 1] = mean(X[, i]);
    Xc[, i - 1] = X[, i] - means_X[i - 1];
  }
}
parameters {
  vector[Kc] b;  // population-level effects
  real Intercept;  // temporary intercept for centered predictors
}
transformed parameters {
}
model {
  // likelihood including constants
  if (!prior_only) {
    target += bernoulli_logit_glm_lpmf(Y | Xc, Intercept, b);
  }
  // priors including constants
  target += normal_lpdf(b[1] | 0, 0.857251723773791);
  target += normal_lpdf(b[2] | 0, 0.135661646518528);
  target += normal_lpdf(Intercept | -2.944, 1.21582670564209);
}
generated quantities {
  // actual population-level intercept
  real b_Intercept = Intercept - dot_product(means_X, b);
}

# Adaptation terminated
# Step size = 0.76105
# Diagonal elements of inverse mass matrix:
# 0.205292, 0.0151411, 0.0669069

# Adaptation terminated
# Step size = 0.881036
# Diagonal elements of inverse mass matrix:
# 0.267267, 0.0183738, 0.0663921

# Adaptation terminated
# Step size = 0.797516
# Diagonal elements of inverse mass matrix:
# 0.24933, 0.0161093, 0.063675

# Adaptation terminated
# Step size = 0.837887
# Diagonal elements of inverse mass matrix:
# 0.202697, 0.0211035, 0.0710508

CXXFLAGS = -O2 -Wall $(DEBUGFLAG) -mfpmath=sse -msse2 -mstackrealign

std::vector<double, std::allocator<double> > constrain_pars(std::vector<double, std::allocator<double> >)

std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > constrained_param_names(bool, bool)