/********************************************************************** * loglinear model **********************************************************************/ data { int n; // number of observations int k; // number of predictors array[n] int y; // response matrix[n, k] x; // matrix of covariates real sigma; // standard deviation in prior } parameters { vector[k] beta; // regression coefficient } model { vector[n] eta; eta = x * beta; y ~ poisson(exp(eta)); beta ~ normal(0, sigma); } /********************************************************************** * THE END **********************************************************************/