-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from andrjohns/array-syntax
Update deprecated syntax for future rstan compatibility
- Loading branch information
Showing
16 changed files
with
198 additions
and
198 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// Covariates | ||
vector[num_obs] x_cont[num_cov_cont]; | ||
vector[num_obs] x_cont_unnorm[num_cov_cont]; | ||
int x_cont_mask[num_cov_cont, num_obs]; | ||
int x_cat[num_cov_cat, num_obs]; | ||
array[num_cov_cont] vector[num_obs] x_cont; | ||
array[num_cov_cont] vector[num_obs] x_cont_unnorm; | ||
array[num_cov_cont, num_obs] int x_cont_mask; | ||
array[num_cov_cat, num_obs] int x_cat; | ||
|
||
// Expanding beta or teff to a vector of length equal to num_obs. | ||
// The value idx_expand[j]-1 tells the index of the beta or teff parameter | ||
// that should be used for observation j. If observation j doesn't | ||
// correspond to any beta parameter, then idx_expand[j] should be 1. | ||
int<lower=1, upper=num_bt+1> idx_expand[num_obs]; | ||
array[num_obs] int<lower=1, upper=num_bt+1> idx_expand; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Priors types and hyperparameters | ||
int<lower=0> prior_alpha[num_comps, 2]; // {prior_type, transform} | ||
int<lower=0> prior_ell[num_ell, 2]; // {prior_type, transform} | ||
int<lower=0> prior_wrp[num_ns, 2]; // {prior_type, transform} | ||
int<lower=0> prior_teff[num_uncrt>0, 2]; // {prior type, is_backwards} | ||
real hyper_alpha[num_comps, 3]; | ||
real hyper_ell[num_ell, 3]; | ||
real hyper_wrp[num_ns, 3]; | ||
real hyper_teff[num_uncrt>0, 3]; | ||
real hyper_beta[num_heter>0, 2]; | ||
array[num_comps, 2] int<lower=0> prior_alpha; // {prior_type, transform} | ||
array[num_ell, 2] int<lower=0> prior_ell; // {prior_type, transform} | ||
array[num_ns, 2] int<lower=0> prior_wrp; // {prior_type, transform} | ||
array[num_uncrt>0, 2] int<lower=0> prior_teff; // {prior type, is_backwards} | ||
array[num_comps, 3] real hyper_alpha; | ||
array[num_ell, 3] real hyper_ell; | ||
array[num_ns, 3] real hyper_wrp; | ||
array[num_uncrt>0, 3] real hyper_teff; | ||
array[num_heter>0, 2] real hyper_beta; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.