This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data { | |
int<lower=0> N; // rows | |
int<lower=1> D; // delays, first is 0, last D-1 | |
int<lower=0> T; // days, first is 1 | |
int<lower=0> counts[N]; | |
int<lower=1> t[N]; | |
int<lower=0, upper=D-1> dt0[N]; | |
int<lower=0, upper=D-1> dt1[N]; | |
real<lower=0> dir_prior; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data { | |
int<lower=1> n; // n = 2632 | |
int y[n]; // number of shootings per day | |
} | |
transformed data { | |
int<lower=1,upper=365> yday[n]; | |
for (i in 1:n) yday[i] = i % 365 + 1; | |
} | |
parameters { | |
vector[n] mu_innovations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
# install.packages("rgeos", type="source") | |
# install.packages("rgbif", type="source") | |
# library(rgbif) | |
# d <- occ_search(orderKey=797, datasetKey="a8d08280-1def-11de-be11-b8a03c50a862", year="2013", limit=2000) | |
library(RJSONIO) | |