Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Depends:
Imports:
methods,
Rcpp (>= 0.12.0),
rstan (>= 2.18.1),
rstan (>= 2.26.0),
MASS,
expm,
stats,
Expand All @@ -30,8 +30,8 @@ LinkingTo:
BH (>= 1.66.0),
Rcpp (>= 0.12.0),
RcppEigen (>= 0.3.3.3.0),
rstan (>= 2.18.1),
StanHeaders (>= 2.18.0),
rstan (>= 2.26.0),
StanHeaders (>= 2.26.0),
RcppParallel (>= 5.0.1)
SystemRequirements: GNU make
NeedsCompilation: yes
8 changes: 4 additions & 4 deletions inst/stan/CARMM_COV_P.stan
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
functions {
real sparse_car_lpdf(vector phi,
real alpha,
int[,] W_sparse, vector D_sparse, vector lambda, int n, int W_n) {
array[,] int W_sparse, vector D_sparse, vector lambda, int n, int W_n) {
row_vector[n] phit_D; // phi' * D
row_vector[n] phit_W; // phi' * W
vector[n] ldet_terms;
Expand Down Expand Up @@ -45,7 +45,7 @@ data {
matrix[n, k] X_cov; // predictor matrix

// Outcomes
int<lower = 0> y[m];
array[m] int<lower = 0> y;

// Offsets
vector[m] log_offset;
Expand All @@ -62,7 +62,7 @@ transformed data {
// Adjacency
// Number of directed neighbours per area
vector[n] n_i;
int W_sparse[W_n, 2]; // adjacency pairs
array[W_n, 2] int W_sparse; // adjacency pairs
vector[n] D_sparse; // diagonal of D (number of neigbors for each site)
vector[n] lambda; // eigenvalues of invsqrtD * W * invsqrtD

Expand Down Expand Up @@ -119,7 +119,7 @@ model {
y ~ poisson(exp(log_offset + r_mm));
}
generated quantities {
int<lower = 0> yrep[m];
array[m] int<lower = 0> yrep;
vector[m] log_lik;
vector[m] log_lik_rep;
real sum_ll;
Expand Down