Skip to content

Instantly share code, notes, and snippets.

@piroyoung
Last active January 4, 2016 12:29
Show Gist options
  • Save piroyoung/8621831 to your computer and use it in GitHub Desktop.
Save piroyoung/8621831 to your computer and use it in GitHub Desktop.
Model of Poison regression
data {
int<lower=0> N;
real x[N];
real f[N];
int<lower=0,upper=100> y[N];
}
parameters {
real b0;
real b1;
real b2;
}
model {
for (n in 1:N)
log(y[n]) ~ poisson(b0 + x[n]* b1 + f[n] * b2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment