data {
  int<lower=0> n;         // number of observations
  real x[n];            // explanatory observations
  real y[n];          // dependent observations
}
parameters {
  real<lower=0> delta_0;
  real<lower=0> delta_1;
  real beta_0;
  real beta_1;
}
model {
  for (i in 1:n) {
    target += - log(delta_0 + delta_1*x[i]) - 0.5*((y[i] - (beta_0 + beta_1*x[i]))/(delta_0 + delta_1*x[i]))^2;
  }
}

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